Question: Exercise #1: PC-Relative Addressing Mode Assume you are given an array of four 16-bit numbers stored in memory with a starting address x3100. Using PC-relative

Exercise #1: PC-Relative Addressing Mode

Assume you are given an array of four 16-bit numbers stored in memory with a starting address x3100. Using PC-relative 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. You will need to demonstrate the correct execution of your program by using the LC-3 Simulator.

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!