Professional Documents
Culture Documents
DATE : 30 12 2021
INSTRUCTIONS TO CANDIDATES:
1. This examination paper consists of two (2) PART questions. Answer ALL questions.
2. All answers to a new question should start on a new page.
3. All calculations and assumptions must be clearly stated.
4. Candidates are not allowed to bring any materials other than those allowed by the
invigilator into the examination room.
EXAMINATION REQUIREMENTS:
APPENDIX:
This examination paper consists of SIX (6) printed pages including the front page.
CONFIDENTIAL 2122I/BTE3053/BTE3254
[4 Marks]
[CO1, PO1, C3]
R3 = 23D R4 = R4+1
R3 = 0x10 R4 =0x17
[4 Marks]
[CO1, PO1, C3]
2
CONFIDENTIAL 2122I/BTE3053/BTE3254
3. Determine the values of C-flag, Z-flag and V-flag after execute the following program.
C=0 V= 1 Z= .1
C = 1. V= 1 Z= 1
[6 Marks]
[CO1, PO1, C3]
3
CONFIDENTIAL 2122I/BTE3053/BTE3254
4. Given the initial conditions for the memory, evaluate the following program segment
and determine the new content of register and memory affected.
ST Y, R5 $703 00
ROR R5
$704 AB
INC Y
ST Y, R5 $705 77
YL = 701 $700 FF
$701 A6
YH= 706
$702 6E
$703 BB
$704 91
$705 77
[11 points]
[CO1, PO1, C4]
4
CONFIDENTIAL 2122I/BTE3053/BTE3254
5. Find the delay in μs of the code snippet below if the crystal frequency is 8 MHz.
[6 Marks]
[CO1, PO1, C5]
5
CONFIDENTIAL 2122I/BTE3053/BTE3254
6. Write a program to test the content of address $70 based on flowchart in Figure 1.
START
R20 ($70)
R20 Yes
>$50
($300) $CC
No
Yes
R20
<$30
($300) $EE
No
($300) $AA
STOP
Figure 1
[19 Marks]
[CO1, PO1, C5]
6
CONFIDENTIAL 2122I/BTE3053/BTE3254