home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 181.img / TASM-101.ZIP / ECHOCHAR.ASM < prev    next >
Assembly Source File  |  1988-10-31  |  611b  |  18 lines

  1.    DOSSEG
  2.    .MODEL SMALL
  3.    .STACK 100h
  4.    .CODE
  5. EchoLoop:
  6.    mov  ah,1             ;DOS keyboard input function #
  7.    int  21h              ;get the next key
  8.    cmp  al,13            ;was the key the Enter key?
  9.    jz   EchoDone         ;yes, so we're done echoing
  10.    mov  dl,al            ;put the character into DL
  11.    mov  ah,2             ;DOS display output function
  12.    int  21h              ;display the character
  13.    jmp  EchoLoop         ;echo the next character
  14. EchoDone:
  15.    mov  ah,4ch           ;DOS terminate program function #
  16.    int  21h              ;terminate the program
  17.    END
  18.