logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Write an assembly program called 64bitAdd.s that adds two 64 bit numbers together.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Write an assembly program called 64bitAdd.s that adds two 64 bit numbers together.

1. The first number will be referenced by the label num1 and the second number will be referenced by the label num2.

2. The upper 32 bits of the sum should be placed in EDX and the lower 32 bits in EAX.

3. AFTER the last line of code that you wish to be executed in your program please place the label done.

1. Make sure that there is an instruction after the done line and a new line after that instruction. If you don't your output won't match mine.

4. I have included a Makefile for you that will compile your program.

5. IT IS OF VITAL IMPORTANCE THAT YOU NAME YOUR LABELS AS SPECIFIED AND MAKE THE APPROPRIATE AMOUNT OF SPACE FOR EACH VARIABLE! I will be using gdb to test your code and if your labels do not match then the tests will fail. You must also make sure to include the done label AFTER the last line of code you want executed in your program so that I know where to set break points.

6. The following table shows how the numbers will be laid out in memory.

 

 

num1:

Upper 32 bits of num1

Lower 32 bits of num1

 

num2:

Upper 32 bits of num2

Lower 32 bits of num2

 

The assembly format should be like this: I believe its the x86 assembly format.

 

.global _start

.data dividend:

.long 0 divisor:

.long 0

# quotient in EAX and left_over in EDX # i in ECX

.text

_start:

movl %ecx, $31 #ecx is the iterator that stores the value 31 initially top:

movl $dividend, %ebx #

 

(5/5)
Attachments:

Expert's Answer

538 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

538 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

988 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

746 Answers

Hire Me
expert
Husnain SaeedComputer science

917 Answers

Hire Me
expert
Atharva PatilComputer science

761 Answers

Hire Me

Get Free Quote!

345 Experts Online