Write a sequence of LC3 instructions ADD AND NOT BR in binar


Write a sequence of LC-3 instructions (ADD, AND, NOT, BR) in binary to perform each task. (NOTE: Each task is independent - do not rely on the results of one task to perform the next.) DO NOT assume that you know the starting value of any register.

2. Put the value 6 into R1.

Write a sequence of LC-3 instructions (ADD, AND, NOT, BR) in binary to perform each task. (NOTE: Each task is independent - do not rely on the results of one task to perform the next.) DO NOT assume that you know the starting value of any register.

2. Put the value 6 into R1.

Write a sequence of LC-3 instructions (ADD, AND, NOT, BR) in binary to perform each task. (NOTE: Each task is independent - do not rely on the results of one task to perform the next.) DO NOT assume that you know the starting value of any register.

2. Put the value 6 into R1.

Solution

Binary program as sequence of LC-3instructions:
  
  
   .ORIG x3000 0011000000000000
AND R0, R0, x0 0101000000100000
AND R1, R1, x0 0101001001100000
ADD R1, R1, x9 0001001001101001
BRn EE 0000100000000100
   LD R2, FF 0010010000001000
   LEA R3, FF
   STR R1, R3, #2 0111001011000010
   LEA R7, DD 1110111000000011
EE NOT R5, R5 1001101101111111
   BRnz DD 0000110000000001
   NOT R4, R3 1001100011111111
DD LDR R6, R2, #1 0110110010000001
   TRAP x25 1111000000100101
FF .FILL xFF00 1101000000000000
.FILL xFF00 1111111100000000
   .FILL xFAFA 1111101011111010
   .END

 Write a sequence of LC-3 instructions (ADD, AND, NOT, BR) in binary to perform each task. (NOTE: Each task is independent - do not rely on the results of one t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site