Question
1. Write instructions to add 2 to the contents of r17. 2. Write instructions to calculate 0x12A4 + 0x56B8 3. Write a C and assembly
1. Write instructions to add 2 to the contents of r17.
2. Write instructions to calculate 0x12A4 + 0x56B8
3. Write a C and assembly program to multiply two 8 bit integers (example 20 multiplied by 10). Store the result in register r18. For this problem, you should write a complete program. You should have a .h file where you declare your multiply function, and do the multiplication in a .S file and then call your function in your .ino file. The .ino could look like the following.
-
#include "mul.h"
void setup() { Serial.begin(9600);
Serial.print(my_mul()); }
void loop() { }
Hint: Look at the add program posted under ../Lecture07 codes/add/
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started