Question: ATmega 2560: Create a new project in Atmel Studio. Write an assembly program that uses a procedure to compute three different values of a function.

ATmega 2560:

ATmega 2560: Create a new project in Atmel Studio. Write an assembly

Create a new project in Atmel Studio. Write an assembly program that uses a procedure to compute three different values of a function. It will take the results of the function and store them in SRAM with the first at 0x200, the second at Ox202 and the third at Ox204. The procedure that performs the calculation will use R16 and R17 as inputs. Without modifying R16 or R17, your procedure will make a calculation using the following equation. f(x) = (x + k)2 x where x=R16 and n=R17 You can ignore overflows and carry bits in the calculation. The procedure should return the value in R18. The procedure should also preserve and restore the contents of any other registers used before exiting (e.g. use PUSH and POP). Create a new project in Atmel Studio. Write an assembly program that uses a procedure to compute three different values of a function. It will take the results of the function and store them in SRAM with the first at 0x200, the second at Ox202 and the third at Ox204. The procedure that performs the calculation will use R16 and R17 as inputs. Without modifying R16 or R17, your procedure will make a calculation using the following equation. f(x) = (x + k)2 x where x=R16 and n=R17 You can ignore overflows and carry bits in the calculation. The procedure should return the value in R18. The procedure should also preserve and restore the contents of any other registers used before exiting (e.g. use PUSH and POP)

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!