Addressing Modes Flashcards
1
Q
LC-3 support 5 addressing nodes:
A
- Immediate - the operand is encoded right into the instruction (constraints)
- EG. ADD R0,R1,#-4
- Register - the operand is a register
- add R0,R1,R2
- Direct (or PC relative) - located in memory where the EA is encoded in the instruction
- LD R1,Data
- EA = (PC) + sext(IR[8:0])
- Indirect - located in memory where a pointer to the EA is encoded in the instruction
- LDI R1, Data - this loads into register r1 the content at the memory location stored at memory location data
- Relative (Base+offset) located in memory a pointer to the EA is stored in a register.
- LDR R4,R5 #30