Search code examples
debuggingassemblyloopsincrementtasm

DEBUG how to display, increment, loop in a cmd debug environment


a 0100
mov cx,59
mov ah,02
mov dl,20
int 21
inc dl
loop 0105
int 20

g

i am trying to loop and increment the value in DL but when i run it .it does not show anyting or rather it shows the 'space' character only .i wanted to do this on DEBUG environment so please don't tell me to use TASM xD


Solution

  • You should change your loop instruction, because right now it resets dl with 20h, that's why it prints only the space character. Try looping directly on the int 21h instruction.