Question
Assume you are given an array of four 16-bit numbers stored in memory with a starting address x3100. Using Base Offset addressing, write an LC-3
Assume you are given an array of four 16-bit numbers stored in memory with a starting address x3100. Using Base Offset addressing, write an LC-3 machine language program that will copy the same four 16-bit numbers in reverse order, starting at memory address x3110. For example, if the following are the four 16-bit values stored in x3100,
x3100 | 12 |
x3101 | 23 |
x3102 | 34 |
x3103 | 45 |
then the result of your program execution should write the following starting at memory address x3110:
x3110 | 45 |
x3111 | 34 |
x3112 | 23 |
x3113 | 12 |
Load your program starting at address x3050. Use the same base register for all loads and stores. This means that there should only be one LEA instruction in your program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started