Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

BTE/2122I

Faculty of Electrical & Electronics Engineering Technology


BTE3053 / BTE3254 MICROPORCESSOR AND INTERFACING

Name: ___tengku Muhammad firdaus______ ID:


Section: ___________01_________________ Date: _____16/11/2021___
(Failed to complete all the particulars above will be penalized 2 marks)
QUIZ 1

Mapping CO,PO,Domain,KI: CO1,PO1


CO1: Illustrate the architecture of the microprocessor / microcontroller system and develop
programs for applications in embedded system using assembly language.

1. Determine the addressing modes for each instructions below.

Instruction Addressing Modes


LDS R16, 0x400 Direct addressing mode
ST X, R16 indirect addressing mode
LDI R17, 0x30 Immediate addressing mode

(3 marks)

2. Write an instruction (using logic instruction)

(a) To clear only bit 3 of data in memory address $400

LDI R17, 0X400


CLR R16
LDI YL, 0X00
LDI YH, 0X04
ST Y, R16
INC YL
DEC R17
BRNE LOOP
(b) set only bit 5 and To bit 6 of data in memory address $420

(4marks)

ASA @ FtKEE UMP


BTE/2122I

3. What are the value of R16 and R17 if the following program is executed?

ORG $200 Address Data


LDS R16, 0x30 $30 AA
LDI R17, 0x36
ADD R16, R17 $31 BB
INC R17
$32 CC

$33 DD

$34 EE
R16 =0xAA .
R17 =0x31 . $35 FF

$36 99

(3 marks)

ASA @ FtKEE UMP

You might also like