Question: Write assembly language programs to perform each of the following calculations. In your programs, ignore overflow (i.e., assume that your operand values will not produce

Write assembly language programs to perform each of the following calculations. In your programs, ignore overflow (i.e., assume that your operand values will not produce an overflow).

1- Add long word: Add two 64-bit unsigned values

2- Negate long word: Negate a 64-bit value by replacing the value by its twos complement

3- Subtract long word: Subtract a 64-bit value from another 64-bit value

4- Multiply long word: Multiply two 32-bit unsigned values to get a 64-bit result

Use a little-endian strategy to organize these bytes

store the input values starting at location 1024.

Clearly use labels to indicate your input variables.

You should follow the format described in this section strictly as input will be supplied to your program using this format for testing.

Your data should be organized as follows (in the given order):

1. Pointers to input and output values

2. [For vectors only, each vector pointer is followed immediately by the size of this vector]

3. Input values

4. Output value

5. Other variables if needed

APTR, BPTR, and CPTR contain the addresses of the values A, B, and C, respectively. A is initialized to have the decimal value of 10 (or hex value 000000000000000A), and B is initialized to have the decimal value of 20 (or hex value 0000000000000014). The result C is initialized to zero.

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!