home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
181.img
/
TASM-101.ZIP
/
CHAPXMPL.ARC
/
ECHOCHAR.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-05-02
|
611b
|
18 lines
DOSSEG
.MODEL SMALL
.STACK 100h
.CODE
EchoLoop:
mov ah,1 ;DOS keyboard input function #
int 21h ;get the next key
cmp al,13 ;was the key the Enter key?
jz EchoDone ;yes, so we're done echoing
mov dl,al ;put the character into DL
mov ah,2 ;DOS display output function
int 21h ;display the character
jmp EchoLoop ;echo the next character
EchoDone:
mov ah,4ch ;DOS terminate program function #
int 21h ;terminate the program
END