Using only one LC-3 instruction, how would I move the value in Register 2 into Register 3
How to perform R1 = R2 - R3 using only 3 LC-3 instructions?
Hope you can help. Thanks
Using only one LC-3 instruction, how would I move the value in Register 2 into Register 3
How to perform R1 = R2 - R3 using only 3 LC-3 instructions?
Hope you can help. Thanks
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