Question

You are encouraged to use computer to type the code, here is the template you can use include <atxmega128A1def.inc:> // define def .cseg org Ox00 jmp start start: Ids r0, 0x210 done: jmp done

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Start: LDS r0, 0x210 ; load the 8 bit LSB of number 1 into R0
LDS r1, 0x211 ;load the 8 bit MSB of number 1 into R1
LDS r2, 0x220 ;load the 8 bit LSB of number 2 into R2
LDS r3, 0x221 ;load the 8 bit MSB of number 2 into R3
Add r1, r3. ; First add the LSB's of both numbers
STS r1, 0x231 ; store the LSB of result in 0x231, if any carry is generated it will be added with the MSB.
Addc r0, r2 ; next add the MSB's of both numbers along with the carry
STS r0,0x230 ; store the MSB result in 0x230
Here: jmp here ; end of the program.

Please rate it if you find the answer is helpful.... Thanks...:)

Add a comment
Know the answer?
Add Answer to:
You are encouraged to use computer to type the code, here is the template you can...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please code in Python: A function can be assigned to a variable and passed into another...

    Please code in Python: A function can be assigned to a variable and passed into another function as an argument. Consider the following function that executes a function twice: def exec_2(f): f() f() any function that is passed into exec_2() will be executed twice without parameters. Your task is to write a function exec_4(f) that takes in a function f as a parameter and executes the function f 4 times using the function exec_2. The function f in this case...

  • problem, you will implement a no virtual base class template using the Curiously Recurring Template Pattern...

    problem, you will implement a no virtual base class template using the Curiously Recurring Template Pattern n this or CRTP Your task is to define the Comparable template, implementing the following functions in terms of the Derived class operator<: operator operator operator operator operator Additionally, each function should be noexcept and const-qualified. Please use C++. And also I want a answer implementint the functions in term of the Derived class operator<. There is a question on this website before but...

  • Use python to code! Q1 - You need to keep track of book titles. Write code...

    Use python to code! Q1 - You need to keep track of book titles. Write code using function(s) that will allow the user to do the following. 1. Add book titles to the list. 2. Delete book titles anywhere in the list by value. 3. Delete a book by position. Note: if you wish to display the booklist as a vertical number booklist , that is ok (that is also a hint) 4. Insert book titles anywhere in the list....

  • PHP code that is given : <?php // Here is where your preprocessing code goes //...

    PHP code that is given : <?php // Here is where your preprocessing code goes // An example is already given to you for the First Name $fname = $_GET['fname']; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Exercise 2 - GET Echo</title> <style> body { margin:0; padding:0; font-family: Arial; } form { margin:20px; } input[type="text"], input[type="password"] { width:150px; padding:3px; font-size:1em; } input[type="submit"] { padding:3px; font-size:1em; } label { display:inline-block; width:150px; } .input-container { padding:5px; } </style> </head> <body> <form...

  • Code fragment 2: template <class T> Tplus slancio, T12) ( Tret: Tet - ol +12 Tetun...

    Code fragment 2: template <class T> Tplus slancio, T12) ( Tret: Tet - ol +12 Tetun Tet; } Code fragment 3: Problem 1 (10 points)-True/False Submit a document called Answers.doc Answer the following true/false questions. You must correctly state WIIY your answer is true or false in order to receive credit class Popcorn std::string flavor protected: float price Code fragment 1: public class Employee friend class Movie_gcer Popcorn slumstring Daver, float price) public: static int total employees; int employee_id; this...

  • Write python code on computer, No handwritten code You will implement a program which asks the...

    Write python code on computer, No handwritten code You will implement a program which asks the user to enter scores of different courses in different semesters. The program should read the input and output some simple statistics 1. An example input string by the user is given below. Fal12016-coursel:82, course2:80,course3:85;Spring2018- course4:82;Fall2018-course5:85, course6:50, course7:78 Info from different semesters are separated by a ";", courses in each semester are separated by a,and score and corresponding course is separated by a, information of...

  • Can someone help me with the main class of my code. Here is the assignment notes....

    Can someone help me with the main class of my code. Here is the assignment notes. Implement project assignment �1� at the end of chapter 18 on page 545 in the textbook. Use the definition shown below for the "jumpSearch" method of the SkipSearch class. Notice that the method is delcared static. Therefore, you do not need to create a new instance of the object before the method is called. Simply use "SkipSearch.jumpSearch(...)" with the appropriate 4 parameter values. When...

  • Can you also explain the functions and what they do please? def flatten(1st): ""Takes a nested...

    Can you also explain the functions and what they do please? def flatten(1st): ""Takes a nested list and "flattens" it. >flatten([1, 2, 3]) [1, 2, 3] >>> x = [1, [2, 3], 4] >>> flatten (x) [1, 2, 3, 4] > x = [[1, [1, 1]], 1, [1, 1]] >>> flatten(x) [1, 1, 1, 1, 1, 1] >>> lst = [1, [[2], 3], 4, [5, 6]] >>> flatten (1st) [1, 2, 3, 4, 5, 6] пии "*** YOUR CODE HERE...

  • In C Code provided: #include <stdio.h> int recursive_sequence(int n) { //type your code here } int...

    In C Code provided: #include <stdio.h> int recursive_sequence(int n) { //type your code here } int main() { int number; scanf("%d", &number); printf("recursive_sequence(%d) = %d",number, recursive_sequence(number)); return 0; } The nth term in a sequence of numbers called recursive_sequence can be defined as follows: • recursive_sequence(0) = 0 • recursive_sequence(1) = 1 If n is greater than 1, then recursive_sequence(n) = 2* recursive_sequence(n - 2) + recursive_sequence(n-1) The first 6 terms in this sequence are: 0,1, 1, 3, 5, 11...

  • Objective: 1. Understand sorting algorithm 2. Implement bubble sort in C++ Check slides for a template...

    Objective: 1. Understand sorting algorithm 2. Implement bubble sort in C++ Check slides for a template of the solution, if you need Write a program that asks users to input 10 integers into an array, write a function that takes the array as its argument, use bubble sort to sort the array and output the sorted array in increasing order. #include <iostream> using namespace std; C:IWINDOWSSystems2cmd.exe lease input 10 integers: void bubblesort(int a[10]) int help; int b[10]; for (int i...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT