Past-paper question · 2014 October-November · Paper 32 · Q4(b)

Question 4(b) 2014 · October-November · Paper 32 · 5 marks

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

Official answer for Question 4

Part (b)

Part (b)

✓
Address
✓
ACC
✓
450
✓
OUTPUT

Question 65

✓
A
✓
500
✓
501
✓
501

Question 74

✓
J
✓
501
✓
502
✓
502

Question 65

✓
A
✓
502
✓
503
✓
503

Question 90

✓
Z
✓
503
✓
504
✓
504

Question 32

[5]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International A Level – October/November 2014
✓
9691

Question 32

Mark scheme 9691_w14_ms_32.pdf →

Show text version of question

Question 4

Part (b)

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) 0000 0100 Direct addressing. Load the contents of the given LDD <address> 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 0000 0110 Indirect addressing. At the given address is the LDI <address> address to be used. Load the contents of this second address to ACC 0000 0111 Indexed addressing. Form the address as LDX <address> <address> + 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) 1000 0001 Output the character corresponding to the ASCII OUTCH character code in ACC to the monitor 1001 0000 Input a denary number from the keyboard and store IN in ACC JMP <address> 1100 1000 Unconditional jump to the given address 1100 1001 Compare the contents of ACC with the given CMP <number> number 1110 0111 If the result of the previous compare instruction was JPE <address> a match, jump to the given address

Part (b)

Use the ASCII code table to trace execution 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 450

300 LDI 450 301 CMP 32 302 JPE 308 303 OUTCH 304 LDD 450 305 INC ACC 306 STO 450 307 JMP 300 308 END

450 500

500 65 501 74 502 65 503 90 504 32

[5]

Question 13

Question 5 begins on page 14.

Question 14

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_32.pdf

Keep practising this topic