I'm trying to write a simple "while" in fasm that print A into DOS console 4 times. Here the code
org 100h
use16
jnp ciclo
ciclo:
cmp [c],0
开发者_如何学C jle fine
mov ah,02h
mov dl,'A'
int 21h
dec [c]
jnp ciclo
fine: ret
c db 5
When i run it it prints only one A on the scren and then exit. Sameone can help? Thanks Gianluca
JNP is a conditional jump if the parity flag is not set. You want the unconditional jump (JMP) instead.
精彩评论