0

I am quite new to assembly and trying to figure out reading input from stdin. How do we terminate reading input after user presses enter ?

I am using a86 in dosbox.

jmp lo

readChar:
    mov ah, 01h ; we want to read 
    int 21h ; result in al
ret

lo:
    call readChar
    jnz lo
    int 20h ; exit
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
jdoe
  • 59
  • 10

0 Answers0