Hi All,
I have the following program to convert Lower case character to uppercase letters
org $4000
Alph equ 26 26 Alphabets
begin lea LC,A0 store lowercase to A0
lea UC,A1 store uppercase to A1
move.b #Alph,d1
sub.b #1,d1
loop move.b (A0)+,d0 convert LC to UC
sub.b #32,d0
move.b d0,(A1)+
dbra d0,loop goes back to loop
move.b #9,d0
TRAP #15
org $4100
LC dc.b 'computer hardware' define lowercase
org $4200
UC ds.b 26 reserve for uppercase
END begin
The results displayed as COMPUTER (the HARDWARE is missing I think its due to the spacing in between) I've had tried to define the spacing as follows
SP equ $20 Define ASCII code for spacing
But it still not working.
Anyone out there can help me? Did I do something wrong on my assembler? Please help.