CSEG segment
ASSUME CS:CSEG, ES:CSEG, DS:CSEG, SS:CSEG
org 100h
_start:
mov dx, offset msg_key
call PRINTER
mov ah, 10h
int 16h
cmp al, 'Y'
jz _EXIT
mov dx, offset msg_noexit
call PRINTER
int 20h
PRINTER proc
mov ah, 9
int 21h
PRINTER endp
_EXIT:
mov dx, offset msg_exit
call PRINTER
int 20h
msg_key DB 'Press key "y" for exit$'
msg_exit DB 0Dh, 0Ah, 'Exit!$'
msg_noexit DB 0Dh, 0Ah, 'No exit...$'
CSEG ends
end _start