Untitled
unknown
plain_text
2 years ago
649 B
7
Indexable
.model small;
.stack 100h;
.code
main proc
;display prompt
MOV AH,2; display character function
MOV Dl,'?'; character is '?'
INT 21H; display character
;input a character
MOV AH,1; input key function
INT 21H; ASCII code in AL
mov bl,al; save it in bl
;go to a new line
mov ah,2; display character function
mov dl,0dh; carriage return
int 21h; execute
mov dl,0ah; line feed
int 21h; execute
;display character
mov dl,bl;
int 21h;
;return to dos
mov ah, 4ch;
int 21h;
main endp;
end main;
Editor is loading...