start:
MOV AH,08 ; Function to read keyboard input
INT 21h ; and save it to AL
CMP AL,65 ; Compare what saved in AL by 65 ("A")
JZ output ; If result of CMP is "ZERO" (same as "A"),
; jump to output and skip middle.
middle:
MOV AH,02 ; Function to output char
MOV DL,"N" ; Char to output
INT 21h
output:
MOV AH,02 ; Function to output char
MOV DL,"M" ; Char to output
INT 21h
exit:
MOV AH,4Ch ; Function to exit
MOV AL,00 ; return 0
INT 21h
If you type "A", then it will skip middle label
output> N
But if you type other than "A", then the output is:
output> NM
No comments:
Post a Comment