This code takes a string as input, converts any lowercase letters between a and z to uppercase, and stores the modified string back to the original location. It loads the input string into register R0, sets R2 to the bitmask value 32 to isolate the lowercase letters, loops through the string character by character, converting any lowercase letters to uppercase by ANDing with R2 before storing back to R0 and incrementing to the next character, until reaching the null terminator, at which point it outputs the modified string and repeats the process.
This code takes a string as input, converts any lowercase letters between a and z to uppercase, and stores the modified string back to the original location. It loads the input string into register R0, sets R2 to the bitmask value 32 to isolate the lowercase letters, loops through the string character by character, converting any lowercase letters to uppercase by ANDing with R2 before storing back to R0 and incrementing to the next character, until reaching the null terminator, at which point it outputs the modified string and repeats the process.
This code takes a string as input, converts any lowercase letters between a and z to uppercase, and stores the modified string back to the original location. It loads the input string into register R0, sets R2 to the bitmask value 32 to isolate the lowercase letters, loops through the string character by character, converting any lowercase letters to uppercase by ANDing with R2 before storing back to R0 and incrementing to the next character, until reaching the null terminator, at which point it outputs the modified string and repeats the process.
CMP R1, #0 //look for end of string BEQ done CMP R1, #97 BLT next CMP R1, #122 BGT next AND R1, R1, R2 //Set bit will ensure upper case STRB R1, [R0] next: ADD R0, R0, #1 B loop1
done: MOV R0, #string1 STR R0, .WriteString B start