哪位好心人帮忙给我看我下程序
我编了一个实时显示的时间,然后现在要实现到了某一定时间输出‘ring’,到了某一段时间‘radio’,帮我改改,谢谢data segment
TAB DB 12,50,'ring',12,46,'radio','$'
data ends
STACK SEGMENT
DW 16 DUP(0)
STACK ENDS
code segment
assume cs:code,ds:data,SS:STACK
start:
call clall2 ;调用清全屏
ag: call clear ;调用清显示部分屏幕
call list ;调用显示
call second
;call action
jmp ag
list proc near
push ax
push bx
push cx
push dx
mov ah,2ch ;系统功能调用,读系统时间
int 21h
mov bx,0
push dx
mov dl,0
a1: sub ch,000ah ;CH存小时
js n1
inc dl
jmp a1
n1: add ch,000ah
add dl,30h
mov ah,02h
int 21h
add ch,30h
mov dl,ch
mov ah,02h
int 21h
mov dl,':'
mov ah,02h
int 21h ;显示“:”
mov dl,0
a2: sub cl,000ah ;CL存分钟
js n2
inc dl
jmp a2
n2: add cl,000ah
add dl,30h
mov ah,02h
int 21h
add cl,30h
mov dl,cl
mov ah,02h
int 21h
mov dl,':' ;显示“:”
mov ah,02h
int 21h
pop dx
mov dl,0
a3: sub dh,000ah ;DH存秒
js n3
inc dl
jmp a3
n3: add dh,000ah
add dl,30h
mov ah,02h
int 21h
add dh,30h
mov dl,dh
mov ah,02h
int 21h
pop dx
pop cx
pop bx
pop ax
ret
list endp
second PROC NEAR ;1秒子程序
PUSH AX
PUSH BX
PUSH DX
push di
push cx
mov CX,00H
L1: MOV AL,00110000B ;0计数器,工作方式3,先写最底有效字节,再写最高有效字节
OUT 43H,AL
MOV AX,11930 ;设初值
OUT 40H,AL
MOV AL,AH
OUT 40H,AL
L2: mov Al,00000000B
OUT 43H,AL
in al ,40H
cmp al,0
jnz L2
add CX, 1
CMP CX,100 ;满1秒?继续累计
JNZ L1
pop cx
pop di
POP DX
POP BX
POP AX
RET
Second ENDP
clear proc near
;save registers
push ax
push bx
push cx
push dx
;clear screen
;定窗口显示时钟
mov ah,7 ;to scroll downward function
mov al,0 ;code to blank scree
mov bh,70h ;reverse video attribute
mov ch,0 ;upper left row
mov cl,0 ;upper left column
mov dh,0 ;lower right row
mov dl,20 ;lower left column
int 10h ;call video ROM
;定位
mov ch,0
mov cl,24
mov ah,01h
int 10h
mov dh,0
mov dl,0
mov bh,0
mov ah,02h
int 10h
;locate cursor
mov dx,0
mov ah,2 ;to locate column
int 10h ;call video BIOS
;restore registers
pop dx
pop cx
pop bx
pop ax
ret
clear endp
clall2 proc near
push ax
push bx
push cx
push dx
mov ah,6 ;to scroll up screen
mov al,0 ;blank screen
mov bh,7 ;blank line
mov ch,0 ;upper left row
mov cl,0 ;upper left column
mov dh,24 ;lower right row
mov dl,79 ;lower left column
int 10h ;call video BIOS
pop dx
pop cx
pop bx
pop ax
ret
clall2 endp
action proc near
all: push ax
push bx
mov ax,data
mov DS,ax
mov bx,offset TAB
shi: mov ah,2ch ;系统功能调用,读系统时间
int 21h
cmp ch,[bx]
jz fen
cmp [bx],'$'
jz all
inc bx
inc bx
inc bx
jmp shi
fen:
cmp cl,[bx+1]
jz action1
jmp fen
action1:
mov dl, [bx+2]
mov ah,9
int 21h
pop ax
pop bx
ret
action endp
code ends
end start
再call action 前加“;”我的显示时间就正确,可是目的达不到啊