Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Last active February 25, 2016 07:09
Show Gist options
  • Save ehzawad/05c7f52041923094775e to your computer and use it in GitHub Desktop.
Save ehzawad/05c7f52041923094775e to your computer and use it in GitHub Desktop.
.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