Question: ( a ) ( 1 0 pts ) Generate the machine code corresponding to the Delay and Long _ Delay subroutines of the following AVR
a
pts
Generate the machine code corresponding to the Delay and Long
Delay
subroutines of the following AVR assembly program. Use hexadecimal numbers to
represent the resulting code FOR EACH ASSEMBLY PROGRAM LINE THAT
GENERATES A MACHINE CODE.
b
pts
What is the size of this program in bytes?
c
pts
What are the values of R
R
R
after the execution of Long
Delay
subroutine?
d
pts
How long is the delay introduced by a single call of the following subrou
tine Long
Delay in seconds with a
clock frequency?
e
pts
What should be the minimum stack size to call the Long
Delay subrou
tine?RESET :
; Stack initialization
ldi R low RAMEND
out SPL R
ldi R high RAMEND
out SPH R
Delay:
ldi R $
ldi R $
D:
subi
sbci R
brcc D
ret
LongDelay :
ser R
LD:
rcall Delay
dec R
brne LD
ret
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
