Question: Note: using C language. ELEC 2520 Assignment 2 Submit your homework on canvas. The file format must be either a doc or a pdf file.

Note: using C language.

 Note: using C language. ELEC 2520 Assignment 2 Submit your homework

on canvas. The file format must be either a doc or a

ELEC 2520 Assignment 2 Submit your homework on canvas. The file format must be either a doc or a pdf file. Your file should should be named FirstName LastName Assignment2. Example, if the student's name is John Smith, the file name should be john_smith Assignment2.pdf or john_smith Assignment2.doc. Please complete and submit before 3:30 PM Feb. 25, 2019. 1. Write instructions to add 2 to the contents of 17 2. Write instructions to calculate 0x12A4 0x5688 3. Write a Cand 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 "muih" void setup0 Serial.begin(9600); Serial.printmy mul void loop0 Hint: Look at the "add" program posted under /Lecture07 codes/add 4. State the contents of R17, R16, and data memory location 0x140 after each line in the following program? Idi r16, 5 Idi r17, 2 add r16, r17 add r16, rl7 sts Ox140, r16 The contents after the first two lines are provided as shown below. Please complete for 3,4h, and 5 lines. After the line Idi r16,5 R16 will have 5 Memory location Ox140 will have nothing After the line Idi r17, 2 R16 will have R17 will have 2 Memory location 0x140 will have nothing After the line add r16, r17 R16 will have R17 will have Memory location 0x140 will have After the line add r16, r17: R16 will have R17 will have Memory location 0x140 will have After the line sts Ox140, r16 R16 will have R17 will have Memory location 0x140 will have ELEC 2520 Assignment 2 Submit your homework on canvas. The file format must be either a doc or a pdf file. Your file should should be named FirstName LastName Assignment2. Example, if the student's name is John Smith, the file name should be john_smith Assignment2.pdf or john_smith Assignment2.doc. Please complete and submit before 3:30 PM Feb. 25, 2019. 1. Write instructions to add 2 to the contents of 17 2. Write instructions to calculate 0x12A4 0x5688 3. Write a Cand 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 "muih" void setup0 Serial.begin(9600); Serial.printmy mul void loop0 Hint: Look at the "add" program posted under /Lecture07 codes/add 4. State the contents of R17, R16, and data memory location 0x140 after each line in the following program? Idi r16, 5 Idi r17, 2 add r16, r17 add r16, rl7 sts Ox140, r16 The contents after the first two lines are provided as shown below. Please complete for 3,4h, and 5 lines. After the line Idi r16,5 R16 will have 5 Memory location Ox140 will have nothing After the line Idi r17, 2 R16 will have R17 will have 2 Memory location 0x140 will have nothing After the line add r16, r17 R16 will have R17 will have Memory location 0x140 will have After the line add r16, r17: R16 will have R17 will have Memory location 0x140 will have After the line sts Ox140, r16 R16 will have R17 will have Memory location 0x140 will have

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!