Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Source: http://cssimplified.com/computer-organisation-and-assembly-language-programming/an-assembly-lanuage-program-which-converts-string-lower-case-characters-to-upper-case-characters-and-upper-case-characters-to-lower-case-characters
- DATA SEGMENT
- MSG1 DB 10,13,'ENTER ANY STRING :- $'
- MSG2 DB 10,13,'ENTERED STRING IS :- $'
- MSG3 DB 10,13,'CONVERTED STRING IS : $'
- P1 LABEL BYTE
- M1 DB 0FFH
- L1 DB ?
- P11 DB 0FFH DUP ('$')
- DATA ENDS
- DISPLAY MACRO MSG
- MOV AH,9
- LEA DX,MSG
- INT 21H
- ENDM
- CODE SEGMENT
- ASSUME CS:CODE,DS:DATA
- START:
- MOV AX,DATA
- MOV DS,AX
- DISPLAY MSG1
- LEA DX,P1
- MOV AH,0AH
- INT 21H
- DISPLAY MSG2
- DISPLAY P11
- DISPLAY MSG3
- LEA SI,P11
- MOV CL,L1
- MOV CH,0
- CHECK:
- CMP [SI],41H
- JB DONE
- CMP [SI],5BH
- JB LWR
- CMP [SI],61H
- JB DONE
- CMP [SI],7BH
- JG DONE
- UPR: SUB [SI],20H
- JMP DONE
- LWR: ADD [SI],20H
- DONE: INC SI
- LOOP CHECK
- DISPLAY P11
- MOV AH,4CH
- INT 21H
- CODE ENDS
- END START
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement