Question 4(d) 2018 · October-November · Paper 11 · 8 marks
Reveal official mark-scheme answer

Official answer for Question 4
Part (d)
Question 1
mark per bullet point
Question 8
Show text version of question
Question 4
Part (d)
Question 4
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 Direct addressing. Load the contents of the location at the given LDD <address> address to ACC. Indexed addressing. Form the address from <address> + the LDX <address> contents of the Index Register. Copy the contents of this calculated address to ACC. LDR #n Immediate addressing. Load the 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). DEC <register> Subtract 1 from the contents of the register (ACC or IX). CMP <address> Compare contents of ACC with contents of <address>. Following a compare instruction, jump to <address> if the compare JPE <address> was True. Following a compare instruction, jump to <address> if the compare JPN <address> 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.
Part (d)
The current contents of the main memory, Index Register (IX) and selected values from the
ASCII character set are provided with a copy of the instruction set.
Address Instruction ASCII code table (selected codes only) 70 LDX 200 ASCII code Character 71 OUT 127 ? 72 STO 203 128 ! 73 LDD 204 129 “ 74 INC ACC 130 * 75 STO 204 131 $ 76 INC IX 132 & 77 LDX 200 133 % 78 CMP 203 134 / 79 JPN 81 Instruction set 80 OUT 81 LDD 204 Instruction Op Explanation 82 CMP 205 Operand code 83 JPN 74 Direct addressing. Load the contents of 84 END LDD <address> the location at the given address to ACC. … Indexed addressing. Form the address from <address> + the contents of the LDX <address> 200 130 Index Register. Copy the contents of this calculated address to ACC. 201 133 Immediate addressing. Load the number 202 130 LDR #n n to IX. 203 0 Store contents of ACC at the given STO <address> address. 204 0 Add the contents of the given address to 205 2 ADD <address> ACC. Add 1 to the contents of the register (ACC INC <register> or IX). IX 0 Subtract 1 from the contents of the DEC <register> register (ACC or IX). Compare contents of ACC with contents of CMP <address> <address>. Following a compare instruction, jump to JPE <address> <address> if the compare was True. Following a compare instruction, jump to JPN <address> <address> if the compare was False. JMP <address> Jump to the given address. Output to the screen the character whose OUT ASCII value is stored in ACC. END Return control to the operating system.
Question 9
Complete the trace table for the given assembly language program.
Instruction Memory address ACC IX OUTPUT address 200 201 202 203 204 205
Question 10
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_w18_qp_11.pdf
