Addressing Modes Flashcards

1
Q

LC-3 support 5 addressing nodes:

A
  1. Immediate - the operand is encoded right into the instruction (constraints)
    1. EG. ADD R0,R1,#-4
  2. Register - the operand is a register
    1. add R0,R1,R2
  3. Direct (or PC relative) - located in memory where the EA is encoded in the instruction
    1. LD R1,Data
    2. EA = (PC) + sext(IR[8:0])
  4. Indirect - located in memory where a pointer to the EA is encoded in the instruction
    1. LDI R1, Data - this loads into register r1 the content at the memory location stored at memory location data
  5. Relative (Base+offset) located in memory a pointer to the EA is stored in a register.
    1. LDR R4,R5 #30
How well did you know this?
1
Not at all
2
3
4
5
Perfectly