|
jnz relies on test to set the flags properly for the loop. dec also modifies flags, so if you move dec after test, jnz uses the result of dec as the loop condition. The reason it doesn't print anything is because save is initialized to DOS string terminators (the '$' character). When DI is 1, it's decremented to 0 and jnz is false, so the loop ends before filling in the first character of save. Since the first character is still '$', it's technically an empty string.
__________________
Even if the voices aren't real, they have some pretty good ideas.
|