Question: Purpose: To write a program in LC-3 machine language starting at memory address x3000 to convert all lower case characters stored in a null terminated
Purpose: To write a program in LC-3 machine language starting at memory address x3000 to convert all lower case characters stored in a null terminated character array to upper case characters, and all upper case letters to lower case. You can assume that no other character will be present in the given array. The characters are stored in bits [7:0], and your converted case characters must also be stored in bits [7:0]. Bits [15:8] in each location must be left intact. The null character at the end of the array must also be copied.
What is given: The character array is stored at memory address starting at x3100. Your program must store the upper case character array starting at address x3200.
Example: See below. Both the original lower case array and the converted upper case array are shown.
| Address | Bits[15:8] | Bits[7:0] |
| x3100 | x64 | x65 |
| x3101 | x74 | x4E |
| x3102 | x7A | x67 |
| x3103 | x7B | x44 |
| x3104 | NULL | NULL |
| x3200 | x64 | x45 |
| x3201 | x74 | x6E |
| x3202 | x7A | x47 |
| x3203 | x7B | x64 |
| x3204 | NULL | NULL |
Notes:
You can assume arrays length is less than 256.
All of the 8 bits of ASCII code for NULL character are zero.
I know that i need to figure out how to test if a character is uppercase or not or even a letter but im not sure how to go about it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
