Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write and implement this in LC3 architecture. All Side Effects in registers should be pushed and pulled. Please only answer if you sre sure it

Write and implement this in LC3 architecture. All Side Effects in registers should be pushed and pulled. Please only answer if you sre sure it will run in LC3 simulator!! And please also explain your code at the end. Thank you!
image text in transcribed
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 x40 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions

Question

what does P (Z Answered: 1 week ago

Answered: 1 week ago