The shape of the lesson
By the end of the lesson, learners can
- Five modes: In the lab, choose a mode, change the operand and the index register, and watch which memory location is used.
- Work out the value: The usual exam question gives a block of memory, a value in IX and several instructions, and asks what ends up in the accumulator.
- Why each mode exists: Questions also ask why a mode is useful.
- Immediate (#): the operand is the value.
- Direct: go to the address once.
- Indirect: go to the address, read another address, go there.
- Indexed: add IX to the operand first. Relative: offset from the current instruction.
One picture every idea returns to
An addressing mode tells the processor how to use the operand to find the data. Immediate: the operand is the value (LDM #n). Direct: the operand is the address of the value (LDD). Indirect: the operand is an address that holds the address of the value (LDI, CMI). Indexed: the address is the operand plus the contents of the index register (LDX). Relative: the address is an offset number of locations away from the address of the current instruction.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Where is the value?. The same operand, 200, can mean the number 200, the value stored at address 200, or something stored somewhere else entirely. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Five modes | In the lab, choose a mode, change the operand and the index register, and watch which memory location is used. Project tab 6 of the lab (Addressing modes) and let a student drive it while the class predicts. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Work out the value | The usual exam question gives a block of memory, a value in IX and several instructions, and asks what ends up in the accumulator. Model the worked example Four loads on the board, one line at a time. Your turn: Using the same memory, but with IX now holding 1, give the ACC after LDX 202, and state whether CMI 200 followed by JPE would jump if the ACC held 18. | Pairs |
| 21 to 30 min | Teach and check: Why each mode exists | Questions also ask why a mode is useful. Your turn: A list of five characters is stored at addresses 300 to 304. Explain why LDX 300 inside a loop is better than writing LDD 300, LDD 301, LDD 302 and so on. | Mix-Pair-Share |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 15 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Why each mode exists, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Mix-Pair-Share
Students mix around the room until you call pair; they pair with the nearest classmate, discuss the prompt, then mix again. Three prompts of rising difficulty, three different partners.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| The # is what makes LDM, LDR, ADD #n, SUB #n and CMP #n immediate. | Without it, ADD 5 means "add the contents of address 5", not "add 5". |
| Indexed and indirect are easy to swap. | Indexed adds IX to the operand; indirect looks up a second address in memory. |
Addressing modes: worksheet
6 questions, 15 marks. Written in the style of the papers; no past paper question is reproduced.
Describe immediate, direct and indexed addressing.
The index register holds 3. Memory holds:
| Address | 500 | 501 | 502 | 503 | 504 |
|---|---|---|---|---|---|
| Contents | 502 | 9 | 500 | 14 | 31 |
Give the contents of the ACC after each instruction is executed: (a) LDD 502, (b) LDI 502, (c) LDX 501, (d) LDM #502.
Explain the difference between indirect addressing and indexed addressing.
Using the memory in question 2, with IX holding 3, the ACC holds 500. State whether the compare in each instruction is True or False: (a) CMI 500, (b) CMP 503.
Explain why relative addressing allows a program to be relocated in memory.
A programmer wants to add 10 to the accumulator but writes ADD 10. Explain the error and correct it.
Answer key and marking notes
- Immediate: the operand is the value to be used.
- Direct: the operand is the address that holds the value.
- Indexed: the address used is the operand plus the contents of the index register.
- (a) 500 (the contents of 502).
- (b) 502 (502 holds 500; 500 holds 502).
- (c) 31 (501 + 3 = 504, which holds 31).
- (d) 502 (the value itself).
- Indirect: the operand is the address of a location that holds the address of the data.
- Indexed: the address of the data is found by adding the contents of the index register to the operand.
- (a) 500 holds 502; 502 holds 500; the ACC is 500, so True.
- (b) 503 holds 14; the ACC is 500, so False.
- Each address is given as an offset from the address of the current instruction.
- So if the whole program is moved, the offsets still point to the correct locations (no addresses need changing).
- ADD 10 uses direct addressing: it adds the contents of address 10.
- It should be ADD #10 (immediate addressing) to add the number 10.
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
An instruction stored at address 250 uses relative addressing with an offset of 7. Which address does it use?
- A257
- B243
- C7
- DThe address stored at location 7
Memory holds the values below.
| Address | 400 | 401 | 402 | 403 | 404 |
|---|---|---|---|---|---|
| Contents | 403 | 12 | 400 | 27 | 9 |
The index register (IX) holds 2.
What does the accumulator hold afterLDD 402?- A400
- B403
- C9
- D402
Memory holds the values below.
| Address | 400 | 401 | 402 | 403 | 404 |
|---|---|---|---|---|---|
| Contents | 403 | 12 | 400 | 27 | 9 |
The index register (IX) holds 2.
What does the accumulator hold afterLDI 400?- A27
- B403
- C400
- D402
In which addressing mode is no further memory access needed to obtain the data once the instruction is in the CIR?
- AImmediate
- BDirect
- CIndexed
- DIndirect
Memory holds the values below.
| Address | 400 | 401 | 402 | 403 | 404 |
|---|---|---|---|---|---|
| Contents | 403 | 12 | 400 | 27 | 9 |
The index register (IX) holds 2.
The instructionsLDX 401 then CMI 400 are executed. Which statement is correct?- AThe ACC holds 27 and the compare is True
- BThe ACC holds 27 and the compare is False
- CThe ACC holds 403 and the compare is True
- DThe ACC holds 12 and the compare is False
Memory holds the values below.
| Address | 400 | 401 | 402 | 403 | 404 |
|---|---|---|---|---|---|
| Contents | 403 | 12 | 400 | 27 | 9 |
The index register (IX) holds 2.
Which instruction loads the value 9 into the accumulator?- A
LDX 402 - B
LDI 402 - C
LDD 402 - D
LDM #404
Quiz key
Relative addressing adds the offset to the address of the current instruction: 250 + 7 = 257. 243 subtracts the offset instead of adding it. Using 7 itself treats the offset as a direct address, and following the address stored at 7 describes indirect addressing.
LDD is direct: it loads the contents of address 402, which is 400. 403 is what LDI 402 would give (402 holds 400, which holds 403). 9 is the result of LDX 402 (402 + 2 = 404), and 402 is the operand itself, as LDM #402 would load.
LDI 400 is indirect: address 400 holds 403, so the address to use is 403, which holds 27. 403 stops after the first visit, which is direct addressing (LDD 400). 400 is what indexed addressing gives (400 + 2 = 402, which holds 400), and 402 is just the indexed address, not its contents.
With immediate addressing (shown by #) the operand is the value, so it is already in the CIR. Direct addressing needs one memory read, indexed addressing also reads memory (after adding IX to the operand), and indirect addressing needs two memory reads.
LDX 401 uses 401 + 2 = 403, which holds 27, so ACC = 27. CMI 400 is indirect: 400 holds 403, and 403 holds 27, so 27 is compared with 27: True. Saying False compares the ACC with 403 (the address) instead of its contents. ACC 403 treats 403 as the value rather than the address, and ACC 12 forgets to add IX.
LDX 402 forms the address 402 + 2 = 404, which holds 9. LDI 402 follows 402 to 400 and loads its contents, 403. LDD 402 loads 400. LDM #404 is immediate, so it loads the number 404, not the contents of address 404.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.