Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100H
- .DATA
- MSG1 DW 'SCAN VALUE1- $'
- MSG2 DW 'SCAN VALUE 2- $'
- MSG3 DW 'GREATER VALUE -$'
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- ;FRST MSG
- MOV AH,9
- LEA DX,MSG1
- INT 21H
- ;FRST SCAN
- MOV AH,1
- INT 21H
- MOV BL,AL
- ;NEW LINE
- MOV AH,2
- MOV DL,0AH
- INT 21H
- MOV DL,0DH
- INT 21H
- ;SCND MSG
- MOV AH,9
- LEA DX,MSG2
- INT 21H
- ;SCND SCAN
- MOV AH,1
- INT 21H
- MOV BH,AL
- ;SCND NEWLINE
- MOV AH,2
- MOV DL,0AH
- INT 21H
- MOV DL,0DH
- INT 21H
- ;COMPARE
- CMP BL,BH
- JG GRT
- MOV AH,2
- MOV DL,0AH
- INT 21H
- MOV DL,0DH
- INT 21H
- MOV AH,9
- LEA DX,MSG3
- INT 21H
- MOV AH,2
- MOV DL,BH
- INT 21H
- JMP END_IF
- GRT:
- MOV AH,2
- MOV DL,0AH
- INT 21H
- MOV DL,0DH
- INT 21H
- MOV AH,9
- LEA DX,MSG3
- 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