Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .STACK 100H
- .MODEL SMALL
- .DATA
- MSG1 DW 'PLEASE SCAN A DIGIT (0-9): $'
- MSG2 DW 'YOUR VALUE IS EQUIVALENT 5 $'
- MSG3 DW 'YOUR VALUE IS GREATER THAN 5$'
- MSG4 DW 'YOUR VALUE IS LESS THAN 5$'
- .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
- CMP BL,'5'
- JG GARTER
- JL LESS
- LEA DX,MSG2
- MOV AH,9
- INT 21H
- JMP END_IF
- GARTER:
- LEA DX,MSG3
- MOV AH,9
- INT 21H
- JMP END_IF
- LESS:
- LEA DX,MSG4
- MOV AH,9
- INT 21H
- END_IF:
- MAIN ENDP
- END MAIN
Add Comment
Please, Sign In to add comment