.model small
.code
.startup
push ds
pop es
lNext: xor ax, ax
int 16h
cmp al, 27
je lExit
mov symbol, al
mov ah, 0Eh
mov al, 0Ah
int 10h
mov ah, 0Eh
mov al, 0Dh
int 10h
mov ah, 0Eh
mov al, 07h
int 10h
mov ah, 0Eh
mov al, symbol
int 10h
jmp lNext
lExit: .exit 0
.data
symbol db ?
.stack 128
end