Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago

Question

=+With whom does the firm have to negotiate?

Answered: 1 week ago