Skip to content

Instantly share code, notes, and snippets.

@febnug
Last active August 11, 2021 23:59
Show Gist options
  • Save febnug/617f22d3c5a17bf42aac954ac86152e3 to your computer and use it in GitHub Desktop.
Save febnug/617f22d3c5a17bf42aac954ac86152e3 to your computer and use it in GitHub Desktop.
; assembling using FASM on DOSBox
; fasm.exe utltu.asm
; utltu.com
;
; (c) 2021 Febriyanto Nugroho <[email protected]>
org 100h
mov ah, 09h
mov dx, pesan
int 21h
mov ah, 0ah
mov dx, buffer
int 21h
mov ah, 09h
mov dx, pesan2
int 21h
mov bx, buffer+2
.loop:
cmp byte [bx], 00dh
je exit
mov dl, [bx]
cmp dl, "a"
ja .uppercase
cmp dl, "Z"
jb .lowercase
je .lowercase
.uppercase:
and dl, 0dfh
mov ah, 02h
int 21h
inc bx
jmp .loop
.lowercase:
xor dl, 20h
mov ah, 02h
int 21h
inc bx
jmp .loop
exit:
mov ax, 4c00h
int 21h
pesan db "input : $"
pesan2 db 13, 10, "output : $"
buffer db ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment