Past-paper question · 2014 October-November · Paper 31 · Q4(c)

Question 4(c) 2014 · October-November · Paper 31 · 5 marks

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

Official answer for Question 4

Part (c)

Part (c)

✓
ACC
✓
Location 150
✓
OUTPUT

Question 65

✓
A
✓
200
✓
201
✓
201

Question 76

✓
L
✓
201
✓
202
✓
202

Question 65

✓
A
✓
202
✓
203
✓
203

Question 77

✓
M
✓
203
✓
204
✓
204
✓
Mark as shown
[5]

Mark scheme 9691_w14_ms_31.pdf →

Show text version of question

Question 4

Part (c)

Question 4

The table below gives a subset of the assembly language instructions for a computer with a single

general-purpose register, the Accumulator (ACC), and an index register (IX).

Instruction Opcode Opcode Explanation Operand (mnemonic) (binary) Direct addressing. Load the contents of the given LDD <address> 0000 0100 address to ACC LDV <number> 0000 0101 Load the given number to ACC STO <address> 0001 0000 Store the contents of ACC at the given address Indirect addressing. At the given address is the LDI <address> 0000 0110 address to be used. Load the contents of this second address to ACC Indexed addressing. Form the address as <address> LDX <address> 0000 0111 + the contents of IX. Copy the contents of this address to ACC INC <register> 0000 0011 Add 1 to the contents of the register (ACC or IX) Output to the monitor the character corresponding to OUTCH 1000 0001 the ASCII character code in ACC Input a denary number from the keyboard and store in IN 1001 0000 ACC JMP <address> 1100 1000 Unconditional jump to the given address END 1111 1111 End the program and return to the operating system

Question 9

The diagram shows a program loaded in main memory starting at location 100.

Locations 200 onwards contain data which are used by the program.

Part (c)

Use the ASCII code table to trace the first four iterations of the given program.

ASCII code table (part)

Character Decimal Character Decimal Character Decimal

<Space> 32 I 73 R 82

A
65 J 74 S 83
B
66 K 75 T 84
C
67 L 76 U 85
D
68 M 77 V 86

E 69 N 78 W 87

F 70 O 79 X 88

G 71 P 80 Y 89

H 72 Q 81 Z 90

Location ACC OUTPUT 150

100 LDI 150 101 OUTCH 102 LDD 150 103 INC ACC 104 STO 150 105 JP 100 106 END 107

150 200

200 65 201 76 202 65 203 77 204 32 205 32

[5]

Question 12

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 9691_w14_qp_31.pdf

Keep practising this topic