Question

Hello, I am trying to do an assignment that requires writing an MSP432 code to add...

Hello, I am trying to do an assignment that requires writing an MSP432 code to add two 64 bit numbers together and store the result in memory location 0x2000_0000. The problem is that the it is a 32 bit register. I don't know how to add to a load 64 bit numbers. The question is below but please feel free to use your own examples, I will understand better. Thank you very much.

Write a small MSP432 code segment that adds the 64-bit binary numbers 0x1122_3344_5566_7788 and 0x8877_6655_4433_2211 together and stores the 64-bit binary result to memory location 0x2000_0000. Enter the code in your lab tools and cross-check your answer. Include a printout of your source assembly file with the final answer.

Homework Answers

Answer #1

Answer:- The addition can be done using ADDS and ADC instruction. ADD instruction simply adds two data values but ADC adds the data value with carry flag also.

We load the values in registers as-

R1 = 0x5566_7788, R2 = 0x4433_2211 then
R3 = 0x1122_3344, R4 = 0x8877_6655

perform ADDS for R1 and R2 as-
ADDS R5, R1, R2 => R5 = R1 + R2 and update the flag bits

then use ADC i.e. add with carry instruction as-
ADC R6, R3, R4 => R6 = R3 + R4 + Carry from last addition.

Now, R6:R5 has the overall addition result of the 64-bit data mentioned in the question. To store this in the memory we can use STRD instruction i.e. store double. Like-

MOV R1, =0x0x20000000 ;R1 = the address
STRD R5, R6, [R1] ;keep the value of R5 and R6 in the memory 0x20000000.

Dear student, please comment if you have any query. Thank you.

Know the answer?
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
Similar Questions
Hello Expert, I am stuck on this assignment and can't get my code to run. I...
Hello Expert, I am stuck on this assignment and can't get my code to run. I would really appreciate it if anyone can help me. Assignment Requirements: Your software development company wants to continue developing and enhancing a software for internal use. For this week's assignment, it is required to read from a JSON application file (data.json) containing employee information. You will not use LINQ for this task. Your tasks include: Convert the previously created data.txt file into a JSON...
PLEASE SOLVE WILL RATE AND THUMBS UP Simple assembly code question: In this question you will...
PLEASE SOLVE WILL RATE AND THUMBS UP Simple assembly code question: In this question you will write a simple program to loop through an array (i.e., writing while statements in assembly) of non-zero numbers. Write an LC3 assembly program for converting a list of non-zero integers into their absolute values. The program starts at x3000. It will first load the address ARRAY of the start of the list into register R0. After this, R0 now contains the location in memory...
PLEASE EXPLAIN EACH LINE OF CODE ONLY. USE COMMENTS NEXT TO EACH LINE TO EXPLAIN WHAT...
PLEASE EXPLAIN EACH LINE OF CODE ONLY. USE COMMENTS NEXT TO EACH LINE TO EXPLAIN WHAT EACH IS CODE IS DOING THANKS. PLEASE COPY PASTE AFTER YOURE DONE NOT SCREENSHOT BECAUSE I NEED TO BE ABLE TO EDIT IT THANKS. // MODULE B: Method 2: Embedding an in-line asssembly language module in a C progrmming #include "stdafx.h" #include "stdio.h" #include<iostream> int main () { printf(" Lab_No_01_Getting_Stated_into_x86_Assembly_from_a_C++_program\n"); // Lab number and title here printf(" Module B: Embedding an in-line asssembly language...
For this assignment you will implement a simple calculator or interpreter that reads arithmetic expressions from...
For this assignment you will implement a simple calculator or interpreter that reads arithmetic expressions from a file. Specifically, you will implement the following function: /* * Reads one arithmetic "expression" at a time from a file stream, computes, then * returns the result. If there are additional expressions in the file, they are * read and computed by successive calls to “calculator”. * * “Expressions” are groups of operations (add, subtract, multiply, divide). Your * calculator will read and...
Using the following code perform ALL of the tasks below in C++: ------------------------------------------------------------------------------------------------------------------------------------------- Implementation: Overload input...
Using the following code perform ALL of the tasks below in C++: ------------------------------------------------------------------------------------------------------------------------------------------- Implementation: Overload input operator>> a bigint in the following manner: Read in any number of digits [0-9] until a semi colon ";" is encountered. The number may span over multiple lines. You can assume the input is valid. Overload the operator+ so that it adds two bigint together. Overload the subscript operator[]. It should return the i-th digit, where i is the 10^i position. So the first...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT