Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms

Q21 · 9618/31/O/N/25 Q11

Worked solution from the Further Programming Paper 3 Advanced Theory booklet, Part 1 of 2.

Q219618/31/O/N/25original Q11Structured · 7 marks
Question 11 from 9618/31/O/N/25

Worked solution

(a)

Load 100 and store it in the constant. Load the contents of 632, subtract the constant, store in Answer. Then set up the labelled data away from the code.

LDM #100
STO Constant
LDD 632
SUB Constant
STO Answer
Constant: 100
Answer:

LDM #100 [1]

STO used with a labelled address (Constant or Answer) [1]

LDD 632 [1]

SUB Constant using the label [1]

Value 100 stored at the labelled address Constant: away from the code [1]

Completed table:

LabelContents
Constant:100
Answer:

Both labels (Constant: and Answer:) set up away from the code [1]

(b)

ACC = 45 − 100

Write: −55 [1]

KEY IDEALoad, operate and store with labelled addresses, and put the labelled data after the code.
TOTAL 7 marks

Official mark scheme

Mark scheme for 9618/31/O/N/25 question 11
VIDEO
▶ Whole paper

Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.