Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100H
- .DATA
- MSG1 DB 0AH,0DH,'Please enter anything: $'
- MSG2 DB 0AH,0DH,'You have entered: $'
- MSG3 DB 0AH,0DH,'Thank you. Program ends here.$'
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- L1:
- LEA DX,MSG1
- MOV AH,9
- INT 21H
- MOV AH,1
- INT 21H
- MOV BL,AL
- LEA DX,MSG2
- MOV AH,9
- INT 21H
- MOV AH,2
- MOV DL,BL
- INT 21H
- JMP L2
- L2:
- LEA DX,MSG1
- MOV AH,9
- INT 21H
- MOV AH,1
- INT 21H
- MOV CL,AL
- LEA DX,MSG2
- MOV AH,9
- INT 21H
- MOV AH,2
- MOV DL,CL
- INT 21H
- JMP L3
- L3:
- LEA DX,MSG1
- MOV AH,9
- INT 21H
- MOV AH,1
- INT 21H
- MOV BH,AL
- LEA DX,MSG2
- MOV AH,9
- INT 21H
- MOV AH,2
- MOV DL,BH
- INT 21H
- CMP BL,CL,BH
- JE L4
- JMP L1
- L4:
- LEA DX,MSG3
- MOV AH,9
- INT 21H
- JMP EXIT
- EXIT:
- MOV AH,04H
- INT 21H
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement