Cambridge AS Level Computer Science 9618 · 4.2 Assembly Language

Q24 · 9618/12/M/J/23 Q3

Worked solution from the Processor Fundamentals Paper 1 Theory Fundamentals booklet, Part 2 of 3.

Q249618/12/M/J/23original Q3Structured · 6 marks
Question 3 from 9618/12/M/J/23

Worked solution

(a)

The first pass deals with the source text and labels. The second pass makes the object code.

ActionPass
generates object codesecond
reads the source code one line at a timefirst and second
removes white spacefirst
adds labels to the symbol tablefirst

generates object code → second [1]

reads the source code one line at a time → both first and second [1]

removes white space and adds labels to the symbol table → first [1]

(b)

Write the three terms in order:

Direct [1]

Indirect [1]

Immediate [1]

KEY IDEAFirst pass: tidy the code and build the symbol table; second pass: generate object code.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/12/M/J/23 question 3
VIDEO
▶ Starts at Q3 (39:33)

Starts at Q3 (39:33) · 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.