-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariable.asm
More file actions
50 lines (29 loc) · 904 Bytes
/
variable.asm
File metadata and controls
50 lines (29 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;---------------------------------------------------------------- Display variable data from assign and user-----------------------------------------------------
.model small
.stack 100h
.data
variablename db 9 ; variable value = 10
var1 db ?
.code
main proc
mov ax, @data
mov ds, ax
;----------Display variable value from---------------;
mov ah,2
add variablename, 48 ; 48+9 = 57 = 9
mov dl,variablename
int 21h
;---------Store value in variable from user ------------;
mov ah, 1
int 21h
mov var1, al
;-------- Display var1 value from user ----------;
mov ah, 2
mov dl,var1
int 21h
;--------Exit from doss-------------;
exit:
mov ah, 4ch
int 21h
endp
end main