- 2071 Chaitra · 4 marks
LD instruction under addressing modes
Short answer
The LD instruction loads data into the accumulator using various addressing modes: immediate (LD #NBR), direct (LD ADR), indirect (LD @ADR), relative (LD $ADR), indexed (LD ADR(X)), register (LD R1), register indirect (LD (R1)), and autoincrement (LD (R1)+). Each mode computes a different effective address: immediate uses the operand in the instruction, direct uses the address field, indirect fetches the address from memory, relative adds to PC, indexed adds to XR, and register modes use register contents directly or as pointers.
Describe the operation of the LD (load) instruction under various addressing modes with syntax.
LD (load) copies data into a register (usually the accumulator AC) from the memory or from the instruction. The effective address (EA) depends on the mode. Syntax shown is the form used in textbooks; # means immediate, @ means indirect.
| Mode | Syntax | Operation |
|---|---|---|
| Immediate | LD #NBR | AC ← NBR (operand is in the instruction) |
| Direct | LD ADR | AC ← M[ADR] (EA = ADR) |
| Indirect | LD @ADR | AC ← M[M[ADR]] (EA = M[ADR]) |
| Relative | LD $ADR | AC ← M[PC + ADR] |
| Indexed | LD ADR(X) | AC ← M[ADR + XR] |
| Register | LD R1 | AC ← R1 |
| Register indirect | LD (R1) | AC ← M[R1] |
| Autoincrement | LD (R1)+ | AC ← M[R1]; R1 ← R1 + 1 |
Example: address field ADR = 500, PC = 200, R1 = 400, XR = 100. Then for direct EA = 500, relative EA = 700, indexed EA = 600, register indirect EA = 400, and immediate loads the number 500 itself.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Addressing modes with examples · Computer Organization and Architecture, chapter 2 · asked 10×
- Addressing modes in given instructions · Computer Organization and Architecture, chapter 2
- Instruction fields and address formats for X=(E+F)*(G+H) · Computer Organization and Architecture, chapter 2
- Instruction and data format, addressing modes · Microprocessor, chapter 2 · asked 2×
- Addressing modes of 8051 · Embedded System, chapter 9 · asked 4×
- Addressing modes of 8086 · Microprocessor, chapter 3 · asked 2×
- Features and addressing modes of 8085 · Microprocessor, chapter 2
All Computer Organization and Architecture chapter 2 questions →