loop

this code does not seem to work in NASM. Why not?

testnum2 is 10, and the loop goes on for lots more times then 10. Why?

mov cx,[testnum2]

l3:

int $21

loop l3


Comments

  • : this code does not seem to work in NASM. Why not?

    : testnum2 is 10, and the loop goes on for lots more times then 10. Why?

    : mov cx,[testnum2]

    : l3:

    : int $21

    : loop l3


    are you really calling int 21h with no parameters?

    i don't use NASM, but that could likely be why

    it's not behaving right. ah=??, so you could

    be calling any of the zillion int21 functions.

    try something like:


    mov cx,[testnum2]

    l3:

    mov ah,6

    mov dl,254

    loop l3


    it should print 10 small squares to the screen.

    if that doesn't work, post your entire program.




  • STill no go, it doesn't work.


    : : this code does not seem to work in NASM. Why not?

    : : testnum2 is 10, and the loop goes on for lots more times then 10. Why?

    : : mov cx,[testnum2]

    : : l3:

    : : int $21

    : : loop l3


    : are you really calling int 21h with no parameters?

    : i don't use NASM, but that could likely be why

    : it's not behaving right. ah=??, so you could

    : be calling any of the zillion int21 functions.

    : try something like:


    : mov cx,[testnum2]

    : l3:

    : mov ah,6

    : mov dl,254

    : loop l3


    : it should print 10 small squares to the screen.

    : if that doesn't work, post your entire program.







Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories