作者在 2010-11-17 22:23:30 发布以下内容
cr macro
mov dl,0ah
mov ah,2
int 21h
mov dl,0dh
mov ah,2
int 21h
endm
jinzhi macro
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add ax,3030h
push ax
mov dl,ah
mov ah,2
int 21h
pop ax
mov ah,2
mov dl,al
int 21h
endm
xiexian macro
mov dl,'/'
mov ah,2
int 21h
endm
data segment
n1 db 'shi fen','$'
n2 db 'tian yue ri nian','$'
n3 db 'miao','$'
data ends
writes macro y
lea dx,y
mov ah,9
int 21h
endm
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
writes n2
mov al,06;天口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,07 ;日口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,08;月口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,32h;世纪口地址
out 70h,al
in al,71h
jinzhi
mov al,09;年口地址
out 70h,al
in al,71h
jinzhi
cr
writes n1
mov al,04;时口地址
out 70h,al
in al,71h
jinzhi
xiexian
s1: mov al,02;分口地址
out 70h,al
in al,71h
jinzhi
cr
writes n3
mov al,00 ;秒口地址
mov bl,00
out 70h,al
again:in al,71h
cmp al,bl
je again
mov bl,al
cmp al,0
jz s1
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add ax,3030h
push ax
mov dl,ah
mov ah,2
int 21h
pop ax
mov ah,2
mov dl,al
int 21h
cr
mov ah,0bh
int 21h
cmp al,0
jz again
mov ah,4ch
int 21h
code ends
end start
mov dl,0ah
mov ah,2
int 21h
mov dl,0dh
mov ah,2
int 21h
endm
jinzhi macro
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add ax,3030h
push ax
mov dl,ah
mov ah,2
int 21h
pop ax
mov ah,2
mov dl,al
int 21h
endm
xiexian macro
mov dl,'/'
mov ah,2
int 21h
endm
data segment
n1 db 'shi fen','$'
n2 db 'tian yue ri nian','$'
n3 db 'miao','$'
data ends
writes macro y
lea dx,y
mov ah,9
int 21h
endm
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
writes n2
mov al,06;天口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,07 ;日口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,08;月口地址
out 70h,al
in al,71h
jinzhi
xiexian
mov al,32h;世纪口地址
out 70h,al
in al,71h
jinzhi
mov al,09;年口地址
out 70h,al
in al,71h
jinzhi
cr
writes n1
mov al,04;时口地址
out 70h,al
in al,71h
jinzhi
xiexian
s1: mov al,02;分口地址
out 70h,al
in al,71h
jinzhi
cr
writes n3
mov al,00 ;秒口地址
mov bl,00
out 70h,al
again:in al,71h
cmp al,bl
je again
mov bl,al
cmp al,0
jz s1
mov ah,al
mov cl,4
shr ah,cl
and al,0fh
add ax,3030h
push ax
mov dl,ah
mov ah,2
int 21h
pop ax
mov ah,2
mov dl,al
int 21h
cr
mov ah,0bh
int 21h
cmp al,0
jz again
mov ah,4ch
int 21h
code ends
end start