Question: Implement the following code in LC3 architecture. PLEASE MAKE SURE IT WORKS BEFORE SENDING, it should run and be able to be tested. please provide

Implement the following code in LC3 architecture. PLEASE MAKE SURE IT WORKS BEFORE SENDING, it should run and be able to be tested. please provide and explanation at the end, thank you!
Implement the following code in LC3 architecture. PLEASE MAKE SURE IT WORKS

Exercises .1 Character twister - Program description - Read a character from the keyboard - Subtract x40, so that ' A ' is 1 , 'B' is 2 , etc. - Multiply by 2 - Subtract 1 - Add 40 back, so that 1 is ' A ', etc - Print the character to the screen - Subroutine breakdown - DoSubtraction: Receive Value01 in R0 and Value02 in R1, return (Value01 - Value02) in GP Register R0. - DoMultiplication: Receive Value 01 in R0 and Value 02 in R1, return (Value01 Value02) in GP Register R0. - DoTwister: Carry out steps in the Program Description, calling TRAP x23 to fetch a character, setting up and making subroutine calls to compute the value to print, calling TRAP 21 to print the character. - Main routine - Initialize Stack Pointer - Call DoTwister - HALT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!