Problem 2: (4 points) Consider the following program for converting a string of
ID: 3573304 • Letter: P
Question
Problem 2: (4 points) Consider the following program for converting a string of uppercase letters (A Z) to the lowercase. The string is input from the keyboard one character by one character with an end of (ASCII x23). The result is stored in memory location starting at x5000. Fill in the missing part of the program according to the comments (some may not be given) ORIG x3000 Load into R1 LD R1 ENDC LD R4 addition LD R6, addr (1) Next Get the next character NOT R2 R1 ADD R2 R2 x1 (2) test if is BRZ last convert to lowercase and store the result into R5 (3)Explanation / Answer
(1) LEA R0, msg
(2) LD R1, ENDC
ADD R1, R0, R1
(3) LD R1, 0x0061
ADD R1, R0, R1
LD R1, OFFSET
ADD R5, R0, R1
(4) OUT
//msg: .stringz "HELLO"
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.