Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Created March 13, 2016 09:42
Show Gist options
  • Select an option

  • Save ehzawad/541f61a774fd91e08fb4 to your computer and use it in GitHub Desktop.

Select an option

Save ehzawad/541f61a774fd91e08fb4 to your computer and use it in GitHub Desktop.
.MODEL SMALL
.STACK 100H
.DATA
.CODE
MAIN PROC
;DISPLAY ?
MOV AH,2
MOV DL,'?'
INT 21H
;INPUT 1ST
MOV AH,1
INT 21H
MOV BH,AL
;INPUT 2ND
MOV AH,1
INT 21H
MOV BL,AL
;COMPARE
CMP BH,BL
JLE PRINTBH
JMP PRINTBL
PRINTBH:
MOV DL,BH
MOV AH,2
INT 21H
MOV DL,BL
INT 21H
JMP ENDC
PRINTBL:
MOV DL,BL
MOV AH,2
INT 21H
MOV DL,BH
INT 21H
JMP ENDC
ENDC:
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment