Past-paper question · 2019 May-June · Paper 11 · Q5(c)

Question 5(c) 2019 · May-June · Paper 11 · 8 marks

Original past-paper question for 5(C)
Original past-paper question for 5(C)
Original past-paper question for 5(C)
Reveal official mark-scheme answer Official mark-scheme answer for 5(C)Official mark-scheme answer for 5(C)

Official answer for Question 5

Part (c)

Question 1

mark per bullet point

Question 8

✓
•
✓
Storing 0 in 300 (line 21)
✓
•
✓
Loading 65 (line 28)
✓
•
✓
Outputting A (line 29)
✓
•
✓
Loading 0 (line 30), incrementing ACC (line 31) and storing in 300
✓
(line 32)
✓
•
✓
Incrementing IX (line 33)
✓
•
✓
Loading 67 (line 24) and adding 33 (line (25)
✓
•
✓
Outputting d (line 26)
✓
•
✓
Loading 1 (line 30), incrementing ACC (line 31), storing in 300 (line 32)
✓
and incrementing IX (line 33)
✓
9608/11
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2019
✓
PUBLISHED
✓
Memory address
✓
Instruction
✓
IX
✓
OUTPUT
✓
address
✓
ACC
✓
100
✓
101
✓
102
✓
103
✓
104
✓
300
✓
301

Question 65

Question 67

Question 69

Question 69

Question 68

Question 33

✓
0

Mark scheme 9608_s19_ms_11.pdf →

Show text version of question

Question 5

Part (c)

Question 5

A simple program written in assembly language is translated using a two-pass assembler.

Part (c)

The table shows assembly language instructions for a processor which has one general

purpose register, the Accumulator (ACC), and an Index Register (IX).

Instruction Explanation Op code Operand LDM #n Immediate addressing. Load the denary number n to ACC. Direct addressing. Load the contents of the location at the given address to LDD <address> ACC. Indexed addressing. Form the address from <address> + the contents of the LDX <address> Index Register. Copy the contents of this calculated address to ACC. LDR #n Immediate addressing. Load the denary number n to IX. STO <address> Store contents of ACC at the given address. ADD <address> Add the contents of the given address to ACC. INC <register> Add 1 to the contents of the register (ACC or IX). CMP #n Compare contents of ACC with denary number n. JPE <address> Following a compare instruction, jump to <address> if the compare was True. JPN <address> Following a compare instruction, jump to <address> if the compare was False. JMP <address> Jump to the given address. OUT Output to screen the character whose ASCII value is stored in ACC. END Return control to the operating system.

The current contents of the main memory, Index Register (IX) and selected values from the ASCII character set are:

Address Instruction ASCII code table (Selected codes only) 20 LDM #0 ASCII Code Character 21 STO 300 22 CMP #0 65 A 23 JPE 28 66 B 24 LDX 100 67 C 25 ADD 301 26 OUT 68 D 27 JMP 30 69 E 28 LDX 100 97 a 29 OUT 30 LDD 300 98 b 31 INC ACC 99 c 32 STO 300 100 d 33 INC IX 101 e 34 CMP #2 35 JPN 22 36 END … 100 65 101 67 102 69 103 69 104 68 … 300 301 33

IX 0

Question 11

Trace the program currently in memory using the following trace table. The first instruction has been completed for you.

Instruction Memory address ACC IX OUTPUT address 100 101 102 103 104 300 301

20 0

[8]

Question 12

Topic relevance

Why this question appears here

99% assigned-topic match · Processor fundamentals › Assembly language

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9608_s19_qp_11.pdf

Keep practising this topic