Cambridge A2 Level Computer Science 9618 · 20.1 Programming Paradigms

Q23 · 9618/33/O/N/25 Q13

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

Q239618/33/O/N/25original Q13Structured · 7 marks
Question 13 from 9618/33/O/N/25

Worked solution

Store 250 in X, load location 563 into Y, add X, subtract location 899, store in Total. Working: 125 + 250 = 375, then 375 − 63 = 312.

LDM #250
STO X
LDD 563
STO Y
ADD X
SUB 899
STO Total
X:
Y:
Total:

LDM #250 [1]

LDD 563 [1]

ADD X using the label [1]

SUB 899 [1]

At least one correct STO [1]

LabelContent
X:250
Y:125
Total:312

At least one labelled address set up with its correct value [1]

The other two labelled addresses set up with correct values (Y: 125, Total: 312) [1]

KEY IDEAUse LDM for a number, LDD for an address, and label the data after the code.
TOTAL 7 marks

Official mark scheme

Mark scheme for 9618/33/O/N/25 question 13
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. 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.