Instruction Word Binary Hex LDI, LDI R19, 0 LDI R21, 18 AD D R19, R1 8 STS 0x607, R19

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

1.

Translate the following instruction and color the corresponding opcode and operands:

 
Instruction Word Binary Hex
   
LDI R18, 2 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0xE02

LDI R19, 0                                  

LDI R21, 18                                  
AD R1
R19,                                  
D 8
                                 
STS 0x607, R19

DEC R21                                    

2. Write an AVR assembly program to increment the contents of the RAM


location 0x600
.org 0x00

____ ______, ______


____ _______
____ ______, ______

3. What is the value of the status register after performing the following code:

LDI R16, 0x49


LDI R17, 0xA8
ADD R17, R16

You might also like