Past-paper question · 2016 May-June · Paper 13 · Q4(b)

Question 4(b) 2016 · May-June · Paper 13 · 7 marks

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)

[7]
✓
Memory address
✓
Working
✓
Instruction
✓
ACC
✓
IX
✓
OUTPUT
✓
space

Question 90

Question 91

Question 92

Question 93

Question 2

Question 90

Question 55

Question 34

Question 2

Question 20

Question 55

Question 21

Question 54

Question 22

Question 54

Question 23

Question 3

Question 24

Question 34

Question 25

Question 33

Question 26

Question 27

Question 28

Question 31

Question 67

Question 32

Question 67

Question 33

✓
'C'

Question 34

✓
One mark each for:
✓
•
✓
Instruction 20
✓
•
✓
Instructions 21 and 22
✓
•
✓
Instruction 23
✓
•
✓
Instructions 24 and 25
✓
•
✓
•
✓
Instructions 31 and 32
✓
•
✓
Correct output
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International AS/A Level – May/June 2016
✓
9608

Question 13

Mark scheme 9608_s16_ms_13.pdf →

Show text version of question

Question 4

Part (b)

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

LDD <address> Direct addressing. Load the contents of the given address to ACC. Indexed addressing. Form the address from <address> + the contents of the LDX <address> index register. Copy the contents of this calculated address to ACC. 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>.

JPE <address> Following a compare instruction, jump to <address> if the compare was True.

JPN <address> Following a compare instruction, jump to <address> if the compare was False.

JMP <address> Jump to the given address.

OUT Output to screen the character whose ASCII value is stored in ACC.

END Return control to the operating system.

The diagram shows the contents of the index register:

Index register: 1 1 0 0 1 1 0 1

Part (b)

Complete the trace table on the opposite page for the following assembly language program.

20 LDX 90

21 DEC ACC

22 STO 90

23 INC IX

24 LDX 90

25 DEC ACC

26 CMP 90

27 JPE 29

28 JPN 31

29 ADD 90

30 OUT

31 ADD 93

32 STO 93

33 OUT

34 END : :

90 2

91 90

92 55

93 34

IX 2

Selected values from the ASCII character set:

ASCII Code 65 66 67 68 69 70 71 72 Character A B C D E F G H

Question 7

Trace table:

Memory address Working ACC IX OUTPUT Instruction space 90 91 92 93

2 90 55 34 2

Question 20

Question 21

Question 22

Question 23

Question 24

Question 25

Question 26

[7]

Question 8

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 9608_s16_qp_13.pdf

Keep practising this topic