; arithmetic String Manipulation Example ; Assembly language which converts a string from ; upper case ascii to lower case ascii by adding 32 $BASE 10T ; convert the default base to ; decimal (was hex) ldx #string ; x points to the start of the ; string ldaa 0,x ; load M[X+0] into "A" loop: adda #32 ; set bit 5 by adding 32 staa 0,x ; save new char where it was inx ; go to the next character ldaa 0,x ; load the next character cmpa #46 ; is the character a "."? bne loop ; go back to "loop" if the ; character is not a '.' ; otherwise, we are done, so ; clear the stop bit tpa ; Get the CCR into A anda #$7f ; clear the stop bit tap ; put it back in the CCR stop ; stop works now so stop. ;;;=================================== string: DB 'HELLO WORLD.' org $fffe reset: DW 0000