Question 3(c)(i) 2021 · May-June · Paper 13 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 3
Part (c)
(i)
Question 1
Show text version of question
Question 3
Part (c)
(i)
Question 3
The following table shows part of the instruction set for a processor. The processor has one
general purpose register, the Accumulator (ACC), and an Index Register (IX).
Instruction Explanation Op code Operand Indexed addressing. Form the address from <address> + LDX <address> the contents of the index register. Copy the contents of this calculated address to ACC. LDR #n Immediate addressing. Load the number n to IX. DEC <register> Subtract 1 from the contents of the register (ACC or IX). JMP <address> Jump to the given address. Compare the contents of ACC with the contents of CMP <address> <address>. Following a compare instruction, jump to <address> if the JPE <address> compare was True. Output to the screen the character whose ASCII value is OUT stored in ACC. END Return control to the operating system.
The current contents of the main memory and selected values from the ASCII character set are:
Address Instruction ASCII code table (selected codes only) 75 LDR #2 ASCII code Character 76 LDX 180 36 $ 77 CMP #0 40 ( 78 JPE 82 41 ) 79 OUT 43 + 80 DEC IX 69 E 81 JMP 76 70 F 82 END 71 G
…
180 0 181 41 182 71 183 40 184 70 185 43 186 69
Question 5
Each instruction in the assembly language program is encoded in 16 bits (8-bit op code followed by an 8-bit operand).
(i)
The instruction LDX 234 has the operand 234.
Convert the operand 234 into 8-bit binary.
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_s21_qp_13.pdf
