Write the following in LC3 code: Write a program that compares two values stored at memory locations x30A2 and x30A3. If the value at x30A2 is larger than the value at x30A3 then store the value of 1 in R1, else store the value of 0 in R1.Use PC + offset addressing to load contents of x30A2 into R2 and x30A3 into R3. Repeat the previous using Base + offset (load register). Use the load immediate (LEA) instruction to set up the base (R4) with the address of x30A2

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter11: Operating Systems
Section: Chapter Questions
Problem 30VE
icon
Related questions
Question
100%

Write the following in LC3 code:

Write a program that compares two values stored at memory locations x30A2 and x30A3. If the value at x30A2 is larger than the value at x30A3 then store the value of 1 in R1, else store the value of 0 in R1.Use PC + offset addressing to load contents of x30A2 into R2 and x30A3 into R3.

Repeat the previous using Base + offset (load register). Use the load immediate (LEA) instruction to set up the base (R4) with the address of x30A2

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning