-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprintday.asm
60 lines (53 loc) · 837 Bytes
/
printday.asm
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.model small
.stack 50
.data
chia10 dw 10
nam dw ?
thang dw ?
ngay dw ?
thu dw ?
ngaytam db ?
.code
printday macro thoigian
mov ax,thoigian
xor cx,cx
local lapchia
local docstack
lapchia:
xor dx,dx
div chia10
add dx,30h
push dx
inc cx
cmp ax,0
jne lapchia
docstack:
pop dx
mov ah,2
int 21h
loop docstack
printday endm
main proc
mov ax,@data
mov ds,ax
mov ah,2ah
int 21h
mov nam,cx
mov ngaytam,dl
mov dl,dh
xor dh,dh
mov thang,dx
xor dh,dh
mov dl,ngaytam
mov ngay,dx
xor ah,ah
add ax,1
mov thu,ax
printday nam
printday thang
printday ngay
printday thu
mov ah,4ch
int 21h
main endp
end main