Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.
Run the program from address 500, writing only what changes.
LDM #50 gives 50. DEC ACC gives 49. CMP 51 compares 49 with 48: false, so the program goes on to 504 (JMP 501). The first pass runs 500, 501, 502 and then 504. Second pass: DEC ACC gives 48. CMP 51 compares 48 with 48: true, so JPE 505 jumps. STO 50 stores 48 at address 50. SUB #10 gives 38. STO 51 stores 38 at address 51.
| Instruction address | ACC | 50 | 51 | 52 | 53 |
|---|---|---|---|---|---|
| 47 | 48 | 49 | 50 | ||
| 500 | 50 | ||||
| 501 | 49 | ||||
| 502 | |||||
| 504 | |||||
| 501 | 48 | ||||
| 502 | |||||
| 503 | |||||
| 505 | 48 | ||||
| 506 | 38 | ||||
| 507 | 38 |
First four rows: ACC 50, 49, then 502 and 504 [1]
Second pass rows 501 to 505: ACC 48, then address 50 = 48 [1]
Row 506 ACC = 38 and row 507 address 51 = 38 [1]
Name two modes of addressing and describe each. Any two of these:
Indirect: the operand points to the memory location that holds the address of the data.
Indexed: the address of the data is the operand plus the contents of the Index Register (IX).
Direct: the operand is the address of the data.
Two modes named correctly [2]
Two matching descriptions correct [2]
Clear the register first, then set only the top bit.
AND B00000000 OR B10000000
AND with all 0s clears every bit (also accepted: AND #0 or AND &0) [1]
OR with 10000000 sets only the most significant bit (also accepted: OR #128 or OR &80) [1]
▶ Whole paper
Video solution of the whole paper · by Ismail Adeleke. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.