This assignment is due in class or to my office assistant in RH 215 by 1:45 pm on 6 November.
Suppose the eight registers of the LC-3 have the following values.
R0 | A000 |
R1 | A100 |
R2 | A200 |
R3 | A300 |
R4 | A400 |
R5 | A500 |
R6 | A600 |
R7 | A700 |
Also suppose that the eight memory locations from memory
address x4210
to x4217
have the following values.
x4210 | B000 |
x4211 | B100 |
x4212 | B200 |
x4213 | B300 |
x4214 | B400 |
x4215 | B500 |
x4216 | B600 |
x4217 | B700 |
For the ten addresses shown below, write a single LC-3 instruction
to load the values stored in specified memory
location into register R4
. If the location can't
be loaded in one instruction, state why this is not possible.
Assume that the LC-3 instruction is stored at location
4200
when attempting to address all
of these addresses.
3000
4100
4101
4200
4201
A030
A0FF
A111
B001
B100
Use the symbol table shown below in this question.
BROADWAY | 421B |
EDGEWOOD | 4251 |
MERRIMON | 4309 |
WEAVER | 4402 |
Write the appropriate 16-bit LC-3 machine language word,
in binary or hex, for each assembly language statement shown
below. Assume that the address is located at 4200
in all cases. If the assembly language statement is illegal,
state the reason why.
ADD R0,R3,#5
AND R0,R3,R5
AND R0,R3,#25
BR EDGEWOOD
BRn MERRIMON
BRp WEAVER
LD R5,EDGEWOOD
LDI R5,BROADWAY
LDR R5,R3,#0
LDR R5,R3,#-19