Last active
February 25, 2016 07:09
-
-
Save ehzawad/05c7f52041923094775e to your computer and use it in GitHub Desktop.
This file contains 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
.model small | |
.stack 100h | |
.data | |
a db ? | |
.code | |
main proc | |
FIRST: | |
mov ah, 1 | |
; call emulator stdout | |
int 21h | |
mov a, al | |
cmp a,41h | |
JGE CAPITAL | |
jmp exit | |
cmp a,61h | |
JGE SMALL | |
jmp exit | |
SMALL: | |
mov a, al | |
mov bl, a | |
sub bl, 31h | |
jmp OUTPUT | |
CAPITAL: | |
mov a, al | |
mov bl, a | |
sub bl, 11h | |
jmp OUTPUT | |
OUTPUT: | |
mov ah, 2 | |
mov dl, '1' | |
int 21h | |
mov dl, bl | |
int 21h | |
exit: | |
mov ah, 4ch | |
mov al, 0 | |
int 21h | |
main endp | |
end main | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment