我有一个名为
的功能call print_all
我想循环这个说10次。
mov bx,0
print_again:
call print_all
inc bx
cmp bx,20
jl print_again
它不起作用。为什么不比较。怎么了。
mov al,0 set_1: complete_print[row_star+0],[col_star+0], star_char,color + 4 call print_star19 call delay_star call clear call print_star0 complete_print[row_star+19],[col_star+19], star_char,color + 5 mov currentindex,al call delay_star call clear inc currentindex mov al,currentindex cmp al, 5 jl set_1
此代码甚至不循环5次。 :(
currentindex db ?
del_star db 20
delay_star proc mov ah, 00 int 1Ah mov bx, dx jmp_delay: int 1Ah sub dx,bx cmp dl, del_star jl jmp_delay ret delay_star endp
这里的complete_print代码:
complete_print macro r,c,char,color mov dh, r ;row mov dl, c ;column xor bh,bh mov ah,02h int 10h mov al, char mov bh, 0 mov bl, color mov cx, 1 mov ah, 09h int 10h endm