Pages

Saturday, February 12, 2011

Sample programs in assembly using a86.com(2)

This program converts upper case to lower case making the first letter remain the same and prints the output on the screen.


.model small
.code
org 100h


begin:
jmp a10main
coname db 'LUTHSIE ARELLANO','$'


a10main proc near
lea bx, coname+1
mov cx, 16


a20:
mov ah, [bx]
cmp ah, 41h
jb a30
cmp ah, 5ah
ja a30
xor ah, 00100000h
mov [bx], ah


a30:
inc bx
loop a20
mov ah, 09h
lea dx, coname
int 21h
int 20h


a10main endp
end begin


---------------------------------------


OUTPUT: Luthsie arellano

1 comments:

Anonymous said...

Hi,
It would be great if you added some comments to make it more readable & understandable.
Thanks in advance!

Post a Comment