Processor fundamentals and assembly language – A Level Computer Science (old syllabus, to 2021) (9608)

32 questions · page 2 of 3 · Clear filters

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
16
9608/11/O/N/18 · Question 4Oct/Nov 2018Paper 1117 marks
Loading question…
Question text

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
Direct addressing. Load the contents of the location at the given
LDD
<address>
address to ACC.
Indexed addressing. Form the address from <address> + the
contents of the Index Register. Copy the contents of this calculated
LDX
<address>
address to ACC.
Immediate addressing. Load the number n to IX.
LDR
#n
Store contents of ACC at the given address.
STO
<address>
Add the contents of the given address to ACC.
ADD
<address>
Add 1 to the contents of the register (ACC or IX).
INC
<register>
Subtract 1 from the contents of the register (ACC or IX).
DEC
<register>
Compare contents of ACC with contents of <address>.
CMP
<address>
Following a compare instruction, jump to <address> if the compare
JPE
<address>
was True.
Following a compare instruction, jump to <address> if the compare
JPN
<address>
was False.
Jump to the given address.
JMP
<address>
Output to the screen the character whose ASCII value is stored in ACC.
OUT
Return control to the operating system.
END
(a) (i)
State what is meant by direct addressing and indirect addressing.
Direct addressing …
…
Indirect addressing …
…
[2]
(ii)
Explain how the instruction ADD 20 can be interpreted as either direct or indirect
addressing.
Direct addressing …
…
Indirect addressing …
…
[2]
(b) The assembly language instructions in the following table use either symbolic addressing or
absolute addressing.
Tick (3) one box in each row to indicate whether the instruction uses symbolic or absolute
addressing.
Instruction
Symbolic
Absolute
ADD 90
CMP found
STO 20
[2]
(c) The current contents of a general purpose register (X) are:
X
1
0
1
1
1
0
1
0
(i)
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
… [1]
(ii)
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
… [1]
(iii)
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
… [1]
(d) The current contents of the main memory, Index Register (IX) and selected values from the
ASCII character set are provided with a copy of the instruction set.
Address
Instruction
ASCII code table (selected codes only)
70
ASCII code
Character
LDX 200
71
OUT
127
?
72
STO 203
128
!
73
LDD 204
129
“
74
INC ACC
130
*
75
STO 204
131
$
76
INC IX
132
&
77
LDX 200
133
%
78
CMP 203
134
/
79
JPN 81
Instruction set
80
OUT
Instruction
81
LDD 204
Explanation
Op

17
9608/12/O/N/18 · Question 3Oct/Nov 2018Paper 1218 marks
Loading question…
Question text

3
The following 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
Direct addressing. Load the contents of the location at the given address to
LDD
<address>
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.
Immediate addressing. Load the number n to IX.
LDR
#n
Store contents of ACC at the given address.
STO
<address>
Add the contents of the given address to ACC.
ADD
<address>
Add 1 to the contents of the register (ACC or IX).
INC
<register>
Subtract 1 from the contents of the register (ACC or IX).
DEC
<register>
Compare contents of ACC with contents of <address>.
CMP
<address>
Following compare instruction, jump to <address> if the compare was True.
JPE
<address>
Following compare instruction, jump to <address> if the compare was False.
JPN
<address>
JMP
<address>
Jump to the given address.
OUT
Output to the screen the character whose ASCII value is stored in ACC.
Return control to the operating system.
END
(a) (i)
State what is meant by absolute addressing and symbolic addressing.
Absolute addressing …
…
Symbolic addressing …
…
[2]
(ii)
Give an example of an ADD instruction using both absolute addressing and symbolic
addressing.
Absolute addressing …
Symbolic addressing …
[2]
(b) (i)
State what is meant by indexed addressing and immediate addressing.
Indexed addressing …
…
Immediate addressing …
…
[2]
(ii)
Give an example of an instruction that uses:
Indexed addressing …
Immediate addressing …
[2]
(c) The current contents of a general purpose register (X) are:
X
1
1
0
0
0
0
0
1
(i)
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
… [1]
(ii)
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
… [1]
(iii)
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
… [1]
(d) The current contents of the main memory, Index Register (IX) and selected values from the
ASCI

18
9608/12/O/N/18 · Question 4Oct/Nov 2018Paper 1213 marks
Loading question…
Question text

4
A student has written the steps of the fetch stage of the fetch-execute (FE) cycle in register transfer
notation. The student has made some errors.
[PC]
Line 1
MDR
PC + 1
Line 2
PC
[MAR]
Line 3
MDR
PC
Line 4
CIR
(a) Identify the line numbers of three errors that the student has made. Write the correct notation
for each error.
Line number of error
Correct notation
[3]
(b) One stage of the FE cycle includes checking for interrupts.
(i)
Give three different events that can generate an interrupt.
1 …
2 …
3 …
[3]
(ii)
Explain how interrupts are handled during the fetch-execute cycle.
…
…
…
…
…
…
…
…
…
… [5]
(c) The processor uses buses in the FE cycle.
The diagram shows three buses and two descriptions.
Draw one line from each bus to its appropriate description.
Bus
Description
Control bus
Unidirectional
(one direction)
Address bus
Bidirectional
(two directions)
Data bus
[2]

Advertisement
19
9608/13/O/N/18 · Question 2Oct/Nov 2018Paper 1313 marks
Loading question…
Question text

2
The following 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
Direct addressing. Load the contents of the location at the given address
LDD
<address>
to ACC.
Indexed addressing. Form the address from <address> + the contents of
LDX
<address>
the Index Register. Copy the contents of this calculated address to ACC.
Immediate addressing. Load the number n to IX.
LDR
#n
Store contents of ACC at the given address.
STO
<address>
Add the contents of the given address to ACC.
ADD
<address>
<register> Add 1 to the contents of the register (ACC or IX).
INC
<register> Subtract 1 from the contents of the register (ACC or IX).
DEC
Compare contents of ACC with contents of <address>.
CMP
<address>
Following compare instruction, jump to <address> if the compare was
JPE
<address>
True.
Following compare instruction, jump to <address> if the compare was
JPN
<address>
False.
Jump to the given address.
JMP
<address>
Output to the screen the character whose ASCII value is stored in ACC.
OUT
Return control to the operating system.
END
(a) State what is meant by relative addressing and indexed addressing.
Relative addressing …
…
…
Indexed addressing …
…
…
[2]
(b) The current contents of a general purpose register (X) are:
X
1
1
1
1
0
0
1
0
(i)
The contents of X represent an unsigned binary integer.
Convert the value in X into denary.
… [1]
(ii)
The contents of X represent an unsigned binary integer.
Convert the value in X into hexadecimal.
… [1]
(iii)
The contents of X represent a two’s complement binary integer.
Convert the value in X into denary.
… [1]
(iv)
Show the result on the general purpose register (X) after the following instruction is run.
INC X
[1]
(c) The current contents of the main memory, Index Register (IX) and selected values from the
ASCII character set are provided with a copy of the instruction set.
ASCII code table (selected codes only)
Address
Instruction
ASCII code
Character
20
LDD 96
450
<
21
CMP 97
451
>
22
JPE 32
452
=
23
LDX 86
453
&
24
CMP 98
454
(
25
JPN 27
455
)
26
OUT
Instruction set
27
LDD 96
28
INC ACC
Instruction
Explanation
29
STO 96
Op
Operand
code
30
INC IX
Direct addressing. Load the contents of
31
JMP 21
LDD
<address>
the location at the given address to ACC.
32
END
Indexed addressing. Form the address
from <address> + the contents of the
…
LDX
<address>
Index Register. Copy the contents of this
calculated address to ACC.
93
453
94
Immediate addressing. Load the number
453
LDR
#n
n to IX.
95
452
Store contents of ACC at the given
96
8
STO
<address>
address.
97
10
Add the contents of the given address to
ADD
<address>
98
453
ACC.
Add 1 to the c

20
9608/13/O/N/18 · Question 6Oct/Nov 2018Paper 1311 marks
Loading question…
Question text

6
The fetch-execute (FE) cycle uses special purpose registers.
(a) The stages in the FE cycle are shown in register transfer notation.
[ … ]
MAR
PC + 1
PC
…
[ [MAR] ]
…
[MDR]
(i)
The steps shown in part (a) are incomplete.
Write the missing register names in the spaces in part (a).
[3]
(ii)
The third instruction [ [MAR] ] has double brackets.
State the purpose of the double brackets.
…
… [1]
(b) One stage of the FE cycle includes checking for interrupts.
State what is meant by an interrupt.
…
…
…
… [2]
(c) There are two types of RAM: dynamic RAM (DRAM) and static RAM (SRAM).
The following table shows five statements about DRAM and SRAM.
Tick (✓) one box in each row to indicate whether the statement applies to DRAM or SRAM.
Statement
DRAM
SRAM
Does not need to be refreshed as the circuit holds the data while the power
supply is on
Mainly used in cache memory of processors where speed is important
Has less complex circuitry
Requires higher power consumption under low levels of access, which is
significant when used in battery-powered devices
Requires data to be refreshed occasionally so it retains the data
[5]

21
9608/11/M/J/18 · Question 8May/June 2018Paper 119 marks
Loading question…
Question text

8
The Von Neumann model uses a series of registers.
(a) Explain what is meant by the term register.
…
…
…
… [2]
(b) (i)
Explain the purpose of the Memory Data Register (MDR).
…
…
…
… [2]
(ii)
Name two registers, other than the MDR, that are used in the fetch-execute cycle.
Register 1 …
Register 2 …
[2]
(c) X is a register. The current contents of X are:
1
0
0
0
0
1
1
1
(i)
The current contents of register X represent an unsigned binary integer.
Convert the value in X into denary.
… [1]
(ii)
The current contents of register X represent a Binary Coded Decimal.
Convert the value in X into denary.
… [1]
(iii)
The current contents of register X stores a two’s complement binary integer.
Convert the value in X into denary.
… [1]
Permission to reproduce items where third-party owned material protected by copyright is included has been sought and cleared where possible. Every
publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International
Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after
the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local

22
9608/13/M/J/18 · Question 3May/June 2018Paper 1312 marks
Loading question…
Question text

3
A computer is designed using the Von Neumann model.
(a) Describe the role of the Arithmetic and Logic Unit (ALU) and Control Unit (CU) in the Von
Neumann model.
ALU …
…
…
…
CU …
…
…
…
[4]
(b) Describe the role of the Status Register and Program Counter (PC).
Status Register …
…
…
…
PC …
…
…
…
[4]
(c) H is a register. The current contents of H are:
1
1
0
0
0
0
0
1
The current contents of register H represent an unsigned binary integer.
(i)
Convert the value in register H into denary.
… [1]
(ii)
Convert the value in register H into hexadecimal.
… [1]
(iii)
The current contents of register H represent a two’s complement binary integer.
Convert the value in register H into denary.
… [1]
(iv)
State why register H does not currently contain a Binary Coded Decimal (BCD).
…
… [1]

23
9608/11/O/N/17 · Question 2Oct/Nov 2017Paper 117 marks
Loading question…
Question text

2
(a) The diagram shows three items of software that translate program code.
Draw one line from each context to the correct item of translation software.
Item of translation software
Context
A web page contains a client-side script.
Assembler
Each instruction in the source code
consists of an op code and an operand.
Interpreter
The source code is required at run-time.
Compiler
When the source code is translated,
copies of the executable program can be
distributed without the need for the source
code.
[4]
(b) The Java programming language is said to be machine or platform independent.
(i)
Describe what is meant by machine independent.
…
… [1]
(ii)
Describe how a Java source code program is translated.
…
…
…
… [2]

Advertisement
24
9608/11/O/N/17 · Question 4Oct/Nov 2017Paper 1117 marks
Loading question…
Question text

4
(a) The diagram shows the components and buses found inside a typical Personal Computer
(PC).
General purpose
registers
A
D
Arithmetic Logic
E
F
Unit (ALU)
B
C
Some components and buses only have labels A to F to identify them.
For each label, choose the appropriate title from the following list. The title for label D is
already given.
•
Control bus
•
System clock
•
Data bus
•
Control unit
•
Main memory
•
Secondary storage
A
…
B
…
C
…
D
Address bus
E
…
F
…
[5]
(b) 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
Op code
Operand
(mnemonic)
(binary)
Immediate addressing. Load number n to ACC.
LDM
#n
1100 0001
Direct addressing. Load the contents of the given
LDD
<address>
1100 0010
address to ACC.
Relative addressing. Move to the address n locations
from the address of the current instruction. Load the
LDV
#n
1100 0011
contents of this address to ACC.
Store the contents of ACC at the given address.
STO
<address>
1100 0100
Decrement the contents of ACC.
DEC
1100 0101
Output the character corresponding to the ASCII
OUTCH
1100 0111
character code in ACC.
Following a compare instruction, jump to <address> if
JNE
<address>
1110 0110
the compare was False.
JMP
<address>
1110 0011
(Unconditionally) jump to the given address.
CMP
#n
1110 0100
Compare the contents of ACC with number n.
Complete the trace table for the following assembly language program.
Label
Instruction
StartProg:
LDV
#CountDown
CMP
Num1
ASCII code table (selected codes only)
JNE
CarryOn
<Space>
3
B
C
X
JMP
Finish
32
51
66
67
88
CarryOn:
OUTCH
LDD
CountDown
DEC
STO
CountDown
JMP
StartProg
Finish:
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
32
Trace table:
CountDown
ACC
OUTPUT
15
67
C
15
[5]
(c) The program given in part (b) is to be translated using a two-pass assembler.
The program has been copied here for you. The program now starts with a directive which
tells the assembler to load the first instruction of the program to address 100.
Label
ORG
#0100
StartProg:
LDV
#CountDown
CMP
Num1
JNE
CarryOn
JMP
Finish
CarryOn:
OUTCH
LDD
CountDown
DEC
STO
CountDown
JMP
StartProg
Finish:
LDM
#88
OUTCH
END
CountDown:
15
32
51
67
Num1:
32
On the first pass of the two-pass process, the assembler adds entries to a symbol table.
The following symbol table shows the first eleven entries, part way through the first pass.
The circular labels show the order in which the assembler made the entries to the symbol
table.
Symbol table
Symbolic address
Absolute address
2
1
100
StartProg
3
4
UNKNOWN
CountDown
5
6
UNKNOWN
Num1
7
8
11
UNKNOWN
104
CarryOn
9
10
UNKNOWN
Finish
Explain how the assembler made these entries to the symbol table.
…
…
…
…

25
9608/12/O/N/17 · Question 4Oct/Nov 2017Paper 1222 marks
Loading question…
Question text

4
The following diagram shows the components and buses found inside a typical personal computer
(PC).
A
B
F
D
C
E
Control unit
Main memory
(a) Some components and buses only have labels A to F to identify them.
For each label, choose the appropriate title from the following list. The title for label D is
already given.
•
Control bus
•
Address bus
•
Arithmetic Logic Unit (ALU)
•
General purpose registers
•
Secondary storage
•
System clock
A
…
B
…
C
…
D
Data bus
E
…
F
…
[5]
(b) Clock speed is a factor that affects the performance of a PC. Explain this statement.
…
…
… [2]
(c) An assembly language program can contain both macros and directives.
(i)
Explain what is meant by these terms.
Macro …
…
…
Directive …
…
…
[3]
(ii)
Give an example of the use of a directive.
…
… [1]
(d) 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
(mnemonic)
Direct addressing. Load the contents of the given address
LDD
<address>
to ACC.
Relative addressing. Move to the address n locations from
the address of the current instruction. Load the contents of
LDV
#n
this address to ACC.
Store the contents of ACC at the given address.
STO
<address>
Increment the contents of ACC.
INC
Output the character corresponding to the ASCII character
OUTCH
code in ACC.
Following a compare instruction, jump to <address> if the
JPE
<address>
compare was True.
Jump to the given address.
JMP
<address>
CMP
#n
Compare the contents of ACC with number n.
Complete the trace table for the following assembly language program.
Label
Instruction
StartProg:
LDV
#Offset
CMP
Value
ASCII code table (selected codes only)
JPE
EndProg
<Spa

26
9608/11/M/J/17 · Question 4May/June 2017Paper 1112 marks
Loading question…
Question text

4
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
Op code
Operand
(mnemonic)
(binary)
Immediate addressing. Load the denary number n to
0000 0001
LDM
#n
ACC.
Direct addressing. Load the contents of the location
0000 0010
LDD
<address>
at the given address to ACC.
Indirect addressing. At the given address is the
0000 0101
address to be used. Load the contents of this second
LDI
<address>
address to ACC.
Indexed addressing. Form the address from
<address> + the contents of the Index Register
0000 0110
LDX
<address>
(IX). Copy the contents of this calculated address to
ACC.
0000 0111
Immediate addressing. Load number n to IX.
LDR
#n
0000 1111
Store the contents of ACC at the given address.
STO
<address>
The following diagram shows the contents of a section of main memory and the Index Register (IX).
(a) Show the contents of the Accumulator (ACC) after each instruction is executed.
IX
0
0
0
0
0
0
1
1
Main
(i)
LDM #500
Memory
Address
contents
ACC
… [1]
13
495
(ii)
LDD 500
86
496
ACC
… [1]
92
497
486
498
(iii)
LDX 500
489
499
ACC
… [1]
496
500
(iv)
LDI 500
497
501
499
502
ACC
… [1]
502
503
(b) Each machine code instruction is encoded as 16-bits (8-bit op code followed by an 8-bit
operand).
Write the machine code for the following instructions:
LDM #17
LDX #97
[3]
(c) Using an 8-bit operand, state the maximum number of memory locations, in denary, that can
be directly addressed.
… [1]
(d) Computer scientists often write binary representations in hexadecimal.
(i)
Write the hexadecimal representation for this instruction:
0
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
… [2]
(ii)
A second instruction has been written in hexadecimal as:
05 3F
Write the equivalent assembly language instruction, with the operand in denary.
… [2]

27
9608/12/M/J/17 · Question 5May/June 2017Paper 1211 marks
Loading question…
Question text

5
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
Op code
Operand
(mnemonic)
(binary)
Direct addressing. Load the contents of
the location at the given address to the
LDD
<address>
0001 0011
Accumulator (ACC).
Indirect addressing. The address to be used is
at the given address. Load the contents of this
LDI
<address>
0001 0100
second address to ACC.
Indexed addressing. Form the address from
<address> + the contents of the Index
LDX
<address>
0001 0101
Register. Copy the contents of this calculated
address to ACC.
Immediate addressing. Load the denary
LDM
#n
0001 0010
number n to ACC.
Immediate addressing. Load denary number n
LDR
#n
0001 0110
to the Index Register (IX).
Store the contents of ACC at the given
STO
<address>
0000 0111
address.
The following diagram shows the contents of a section of main memory and the Index Register (IX).
(a) Show the contents of the Accumulator (ACC) after each instruction is executed.
IX
0
0
0
0
0
1
1
0
(i)
LDD 355
Main
ACC
… [1]
memory
Address
contents
(ii)
LDM #355
350
ACC
… [1]
351
86
352
(iii)
LDX 351
353
ACC
… [1]
354
(iv)
LDI 355
355
351
356
ACC
… [1]
357
22
358
(b) Each machine code instruction is encoded as 16 bits (8-bit op code followed by an 8-bit
operand).
Write the machine code for these instructions:
LDM #67
LDX #7
[3]
(c) Computer scientists often write binary representations in hexadecimal.
(i)
Write the hexadecimal representation for the following instruction.
0
0
0
1
0
1
0
0
0
1
0
1
1
1
1
0
… [2]
(ii)
A second instruction has been written in hexadecimal as:
16 4D
Write the assembly language for this instruction with the operand in denary.
… [2]

28
9608/11/O/N/16 · Question 8Oct/Nov 2016Paper 1113 marks
Loading question…
Question text

8
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
LDX
<address>
contents of the 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.
CMP
<address>
Compare contents of ACC with contents of <address>
Following a compare instruction, jump to <address> if the compare
JPE
<address>
was True.
Following a compare instruction, jump to <address> if the compare
JPN
<address>
was False.
JMP
<address>
Jump to the given address.
Output to the screen the character whose ASCII value is stored in
OUT
ACC.
END
Return control to the operating system.
The diagram shows the contents of the main memory:
Main memory
0110
0100
800
0111
1100
801
1001
0111
802
0111
0011
803
1001
0000
804
0011
1111
805
0000
1110
806
1110
1000
807
1000
1110
808
1100
0010
809
:
:
1011 0101
2000
(a) (i)
Show the contents of the Accumulator after execution of the instruction:
LDD
802
Accumulator:
[1]
(ii) Show the contents of the Accumulator after execution of the instruction:
LDX 800
0
0
0
0
1
0
0
1
Index Register:
Accumulator:
Explain how you arrived at your answer.
…
…
…
… [3]
(b) (i)
Complete the trace table below for the following assembly language program. This
program contains denary values.
LDD
800
100
ADD
801
101
STO
802
102
LDD
803
103
CMP
802
104
JPE
107
105
JPN
110
106
STO
802
107
OUT
108
JMP
112
109
LDD
801
110
OUT
111
END
112
:
:
40
800
50
801
0
802
90
803
Selected values from the ASCII character set:
ASCII code
40
50
80
90
100
Character
(
2
P
Z
d
Trace table:
Memory address
ACC
OUTPUT
800
801
802
803
40
50
0
90
[4]
(ii)
There is a redundant instruction in the code in part (b)(i).
State the address of this instruction.
… [1]
(c) The program used the ASCII coding system for character codes. An alternative coding system
is Unicode.
(i)
Give two disadvantages of using ASCII code.
1 …
…
2 …
… [2]
(ii)
Describe how Unicode is designed to overcome the disadvantages of ASCII.
…
…
…
…

Advertisement
29
9608/12/O/N/16 · Question 5Oct/Nov 2016Paper 1212 marks
Loading question…
Question text

5
The table shows assembly language instructions for a processor that has one general purpose
register, the Accumulator (ACC) and an index register (IX).
Instruction
Explanation
Op Code
Operand
Direct addressing. Load the contents of the given address to
LDD
<address>
ACC.
Index addressing. Form the address from <address> +
LDX
<address>
the contents of the index register. Copy the contents of this
calculated address to ACC.
Indirect addressing. The address to be used is at the given
LDI
<address>
address. Load the contents of this second address to ACC.
STO
<address>
Store the contents of ACC at the given address.
INC
<register>
Add 1 to contents of the register (ACC or IX).
ADD
<address>
Add the contents of the given address to the ACC.
END
Return control to the operating system.
The diagram shows the contents of a section of main memory:
Main memory
0000 0010
100
1001 0011
101
0111 0011
102
0110 1011
103
0111 1110
104
1011 0001
105
0110 1000
106
0100 1011
107
…
1001 1110
200
(a) (i)
Show the contents of the Accumulator after the execution of the instruction:
LDD 102
ACC:
[1]
(ii)
Show the contents of the Accumulator after the execution of the instruction:
LDX 101
IX:
0
0
0
0
0
1
0
0
ACC:
Explain how you arrived at your answer.
…
…
…
… [2]
(iii)
Show the contents of the Accumulator after the execution of the instruction:
LDI 103
ACC:
Explain how you arrived at your answer.
…
…
…
…
…
… [3]
(b) Complete the trace table below for the following assembly language program.
800 LDD
810
801 INC
ACC
802 STO
812
803 LDD
811
804 ADD
812
805 STO
813
806 END
…
810 28
811 41
812 0
813 0
Trace table:
Memory address
ACC
810
811
812
813
28
41
0
0
[6]

30
9608/11/M/J/16 · Question 3May/June 2016Paper 118 marks
Loading question…
Question text

3
(a) Describe how special purpose registers are used in the fetch stage of the fetch-execute cycle.
…
…
…
…
…
…
…
… [4]
(b) Use the statements A, B, C and D to complete the description of how the fetch-execute cycle
handles an interrupt.
the address of the Interrupt Service Routine (ISR) is loaded to the Program
A
Counter (PC).
B
the processor checks if there is an interrupt.
C
when the ISR completes, the processor restores the register contents.
D
the register contents are saved.
At the end of the cycle for the current instruction … .
If the interrupt flag is set, … , … and … .
The interrupted program continues its execution.
[4]

Advertisement