Past-paper question · 2019 May-June · Paper 12 · Q3(c)

Question 3(c) 2019 · May-June · Paper 12 · 8 marks

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

Official answer for Question 3

Part (c)

Question 1

mark per bullet

Question 8

✓
•
✓
Storing 0 in 401 (line 51)
✓
•
✓
Loading memory location 300, value 2 to ACC (line 52)
✓
•
✓
Adding 64 to ACC to give 66 (line 55)
✓
•
✓
Outputting B (line 56)
✓
•
✓
Load 0 (line 57), increment ACC (line 58) and store 1 in 401 (line 59)
✓
•
✓
Incrementing IX (line 60)
✓
•
✓
Loading 5 (line 52), adding 64 (line 55), outputting E (line 56) loading 1
✓
(line 57), incrementing ACC (line 58), storing 2 in 401 (line 59) and
✓
incrementing IX (line 60)
✓
•
✓
Load 0 (line 52) and end
✓
9608/12
✓
Cambridge International AS/A Level – Mark Scheme
✓
May/June 2019
✓
PUBLISHED
✓
Instruction
✓
Memory address
✓
ACC
✓
IX
✓
OUTPUT
✓
address
✓
300
✓
301
✓
302
✓
303
✓
400
✓
401

Question 2

Question 5

✓
0

Question 4

Question 64

✓
0

Mark scheme 9608_s19_ms_12.pdf →

Show text version of question

Question 3

Part (c)

Question 3

The fetch-execute cycle is shown in register transfer notation.

01 MAR [PC]

02 PC [PC] - 1

03 MDR [MAR]

04 CIR [MAR]

Part (c)

The following 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 the 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) 50 LDM #0 ASCII code Character 51 STO 401 65 A 52 LDX 300 66 B 53 CMP #0 54 JPE 62 67 C 55 ADD 400 68 D 56 OUT 69 E 57 LDD 401 58 INC ACC 59 STO 401 60 INC IX 61 JMP 52 62 END … 300 2 301 5 302 0 303 4 … 400 64 401

IX 0

Question 7

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 300 301 302 303 400 401

2 5 0 4 64 0

50 0

[8]

Question 8

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_12.pdf

Keep practising this topic