Question: b ) A simple AVR C - program is shown below in figure 3 b . The assembly language output from the C compiler is

b) A simple AVR C-program is shown below in figure 3b. The assembly
language output from the C compiler is also shown on the right hand side of
figure 3b. Answer the following questions:
i. Complete the assembly language program on the right hand side of
figure 3b below, if the variables x,y and z are stored at address
0100,0101 and 0102 respectively?
(6 marks)
ii. In assembly language program explain how the variable "y" gets
initialised to 022? Explain the operations that are required to
initialise the variable "y".
(4 marks)
iii. Explain where in the CPU the result from the ADD instruction will be
stored after the ADD operation is executed?
(5 marks)
C Source Program
Assembly Language Listing for C program
Figure 3b
 b) A simple AVR C-program is shown below in figure 3b.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!