|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#start=led_display.exe#
#make_bin#
mov ax,0
game:
mov dx, offset msg1
mov ah, 9
int 21h
mov dx, offset msg2
mov ah, 9
int 21h
mov dx, offset msg3
mov ah, 9
int 21h
mov ah,1
int 21h
cmp al,49
je positive
cmp al,50
je reverse
positive:
mov dx, offset msg4
mov ah, 9
int 21h
mov ah,1
int 21H
mov ah,0
sub al,48
mov bl,10
mul bl
mov bx,ax
mov ah,1
int 21H
mov ah,0
sub al,48
mov ah,0
add bx,1
add bx,ax
mov ax,0
x1:
out 199, ax
inc ax
cmp ax,bx
je stop
jmp x1
reverse:
mov dx, offset msg4
mov ah, 9
int 21h
mov ah,1
int 21H
mov ah,0
sub al,48
mov bl,10
mul bl
mov bx,ax
mov ah,1
int 21H
sub al,48
mov ah,0
add bx,ax
mov ax,bx
x2:
out 199,ax
dec ax
cmp ax,-1
je stop
jmp x2
stop:
mov dx, offset msg5
mov ah, 9
int 21h
mov dx, offset msg6
mov ah, 9
int 21h
mov ah,1
int 21h
cmp al,51
je game
mov ah,0
int 16h
msg1 db 0Dh,0Ah,"type number'1' to positive time $"
msg2 db 0Dh,0Ah,"type number'2' to reverse time $"
msg3 db 0Dh,0Ah,"please select a funtion: $"
msg4 db 0Dh,0Ah,"please set duration: $"
msg5 db 0Dh,0Ah,"finish the time!!!!!$"
msg6 db 0Dh,0Ah,"please type '3'time again $"
当我删去 第三行的 mov ax,0
最后的有条件跳转je game 为什么跳转不回去 |
|