Question 2(c) 2018 · October-November · Paper 13 · 7 marks
Reveal official mark-scheme answer

Official answer for Question 2
Part (c)
Question 1
mark per bullet point
Question 7
Question 93
Question 94
Question 95
Question 96
Question 97
Question 98
Question 8
Question 10
Question 8
Show text version of question
Question 2
Part (c)
Question 2
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 Direct addressing. Load the contents of the location at the given address LDD <address> to ACC. Indexed addressing. Form the address from <address> + the contents of LDX <address> 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 compare instruction, jump to <address> if the compare was JPE <address> True. Following compare instruction, jump to <address> if the compare was JPN <address> 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 (c)
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) 20 LDD 96 ASCII code Character 21 CMP 97 450 < 22 JPE 32 451 > 23 LDX 86 452 = 24 CMP 98 453 & 25 JPN 27 454 ( 26 OUT 455 ) 27 LDD 96 Instruction set 28 INC ACC Instruction 29 STO 96 Op Explanation Operand 30 INC IX code
31 JMP 21 Direct addressing. Load the contents of LDD <address> the location at the given address to ACC. 32 END Indexed addressing. Form the address … from <address> + the contents of the LDX <address> Index Register. Copy the contents of this 93 453 calculated address to ACC. 94 453 Immediate addressing. Load the number LDR #n n to IX. 95 452 96 8 Store contents of ACC at the given STO <address> address. 97 10 Add the contents of the given address to 98 453 ADD <address> ACC. Add 1 to the contents of the register (ACC INC <register> or IX). IX 8 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 7
Complete the trace table for the given assembly language program.
Instruction Memory address ACC IX OUTPUT address 93 94 95 96 97 98
Question 20
Question 8
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_13.pdf
