1
  1. Using only one LC-3 instruction, how would I move the value in Register 2 into Register 3

  2. How to perform R1 = R2 - R3 using only 3 LC-3 instructions?

Hope you can help. Thanks

Greeny Ghuji
  • 61
  • 1
  • 4

1 Answers1

2

First question:

ADD R3, R2, #0   // Store (R2 + 0) in R3

Second question:

NOT R1, R3
ADD R1, R1, #1   // Form the two's complement of R3 and store in R1
ADD R1, R1, R2   // Add R2 to R1
Brandon
  • 465
  • 4
  • 15