Question 5(c) 2019 · May-June · Paper 11 · 8 marks
Reveal official mark-scheme answer

Official answer for Question 5
Part (c)
Question 1
mark per bullet point
Question 8
Question 65
Question 67
Question 69
Question 69
Question 68
Question 33
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
Question 12
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
