Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .STACK 100H
- .MODEL SMALL
- .DATA
- MSG1 DW "INPUT:$"
- MSG2 DW "OUTPUT:$"
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- ;MSG1
- LEA DX,MSG1
- MOV AH,9
- INT 21H
- ;PRINT
- MOV AH,2
- MOV DL,'?'
- INT 21H
- ;SCAN1
- MOV AH,1
- INT 21H
- MOV BL,AL
- ;SCAN2
- MOV AH,1
- INT 21H
- MOV CL,AL
- ;NEWLINE
- MOV AH,2
- MOV DL,0DH
- INT 21H
- MOV DL,0AH
- INT 21H
- ;MSG2
- LEA DX,MSG2
- MOV AH,9
- INT 21H
- ;COMPARE
- CMP BL,CL
- JG G
- MOV AH,2
- MOV DL,BL
- INT 21H
- MOV AH,2
- MOV DL,CL
- INT 21H
- JMP END_IF
- G:
- MOV AH,2
- MOV DL,CL
- INT 21H
- MOV AH,2
- MOV DL,BL
- INT 21H
- END_IF:
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement