0% found this document useful (0 votes)
23 views3 pages

GR CHECK Module 4 Exam Style Answers Assembly Language CUP

Uploaded by

medaaaf1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

GR CHECK Module 4 Exam Style Answers Assembly Language CUP

Uploaded by

medaaaf1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Module 4

Exam-style Questions
1 a i

(1 for each arrow)


ii 110 as shown. (1)
b i

(1 for each arrow)


ii 112 as shown. (1)
c i

(3 for the four arrows, 1 for first one correct, 2 for first two correct)
ii 104 as shown. (1)

© Cambridge University Press 2019


2 a Comments, directives and system calls are three strong answers (1 each)
The answer ‘macro calls’ also works because a macro call has to be replaced by the macro code. For the
purpose part of the question, learners could explain that a comment is there to assist the programmer when
reading the program.
A directive is just that: it tells the assembler to do something perhaps associated with how the program
b
should be loaded into memory. A system call’s purpose is to get the operating system to do something, for
example provide access to a hardware component. (1 for any sensible statement)

Memory addresses
Accumulator
201 202 203 204
0 10 0 204 5
10 4 11
11 9
5
4
9

(4 for accumulator values, 2 for the memory address values)

3 a 1 mark each for any of the following. (max 4)


The program is intended to initially take a single character (1) as input from the keyboard (1). It then
takes another character (1) that should be a single number (1), which is to be used to identify how many
times the initially input character is output. It should be noted that the program lacks suitable checks that
the second input is a value in the range 0 to 9. If 0 is input as the second character, the program stops
immediately (1).
b 1 mark each for any of the following. (max 3)
The program repetitively outputs the first character that was input (1), which could be any printing
character (1). The character is output at least once (1) and up to a maximum of nine times (1).
c Label Address
CHARACTER 1010
START 0100
OUTPUT 0111

The addresses are given as 4-bit binary values for illustration of this simple example.

© Cambridge University Press 2019


4 This is Question 9 in 9608 Paper 11 June 2016. At the time of writing the published mark scheme is available
on the Cambridge International School Support Hub (requires registration). The Examiners Report for the June
2016 series is also available there and this may contain comments specific to this question.

The following are what the author of this chapter in the Teacher Resource would suggest as reasonable
answers with alternatives suggested where appropriate.
a i Accumulator: 0 1 0 0 0 1 0 1

The LDX instruction has an operand, which is an address. The value in the Index Register has to be added
to this value to get the address where the datum to be loaded is stored. So, the index register contains
00001000, which is the binary representation of denary 8. The value in address 68 must be loaded into
the accumulator.
ii Index Register 0 0 0 0 0 1 1 1

b Note that the trace table supplied is slightly unusual in that it includes a column for instruction addresses.
This column must record the sequence of their use and must not include any not used which is the case
for address 58. Instructions such as the one at 55 which results in no value changes have to be included in
the table alongside a blank row.

Instruction Memory addresses


ACC IX Output
address 100 101 102 103
20 100 1 0 1
50 20
51 21
52 21
53 100
54 120
55
56
57
59 2
60 20
61 120
62 x
63

Cambridge International AS & A Level Computer Science 9608 paper 11 Q9a June 2016

© Cambridge University Press 2019

You might also like