You're tasked to write a LC-3 program to determine if a number is stored in at memory
Fantastic news! We've Found the answer you've been seeking!
Question:
You're tasked to write a LC-3 program to determine if a number is stored in at memory location x30FF is even or odd. In order to complete this task you must first copy the contents of memory location x30FF to a register using a data movement instruction. To determine if a value is even or odd, you only need to check to see if the LSB (bit 0) is 0 (even) or 1 (odd). R7 = 1 if odd and R7 = 0 if even. Fill in the missing pieces of the program.
NOTE: First answer is 6 bits and second is 4 bits.
R0: x30FF R1: x0001, R7:x0000
Related Book For
Posted Date: