Created
February 5, 2016 21:30
-
-
Save abrarShariar/6cd9c1485f05abff7091 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;case conversion (UPPER -> LOWER) | |
.model small | |
.stack 100h | |
.data | |
up db 'Upper: $' | |
low db 'Lower: $' | |
a db ? | |
.code | |
main proc | |
mov ax,@data | |
mov ds,ax | |
LOOP: mov ah,09h ;output string | |
lea dx,up | |
int 21h | |
mov ah,01h ;input char | |
int 21h | |
mov a,al ;move input into a | |
mov cl,a | |
add cl,32 ;convert to lower | |
mov ah,02h ;char print | |
mov dl,09h ;tab | |
int 21h | |
mov ah,09h ;string print | |
lea dx,low | |
int 21h | |
mov ah,02h ;char print | |
mov dl,cl ;output | |
int 21h | |
mov dl,0Ah ;newline | |
int 21h | |
mov dl,0Dh | |
int 21h | |
jmp LOOP | |
main endp | |
end main | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Case Conversion of character input (UPPER -> lower)