Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .MODEL SMALL
- .STACK 100H
- .DATA
- MSG1 DW "INPUT: $"
- MSG2 DW "OUTPUT IS: $"
- .CODE
- MAIN PROC
- MOV AX,@DATA
- MOV DS,AX
- MOV AH,9
- LEA DX,MSG1
- INT 21H
- MOV AH,1
- INT 21H
- MOV BL,AL
- MOV AH,2
- MOV DL,0AH
- INT 21H
- MOV DL,0DH
- INT 21H
- CMP BL,'a'
- JGE CAPITAL
- CMP BL,'A'
- JG SMALL
- SMALL:
- CMP BL,'Z'
- JLE C
- C:
- MOV AH,9
- LEA DX,MSG2
- INT 21H
- ADD BL,32
- MOV AH,2
- MOV DL,BL
- INT 21H
- JMP END_IF
- CAPITAL:
- CMP BL,'z'
- JL S
- S:
- MOV AH,9
- LEA DX,MSG2
- INT 21H
- SUB BL,32
- MOV AH,2
- MOV DL,BL
- INT 21H
- JMP END_IF
- END_IF:
- MAIN ENDP
- END MAIN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement