Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. 2. In this section of the assignment your task is to write an assembly progra

ID: 3587813 • Letter: 1

Question

1.

2.

In this section of the assignment your task is to write an assembly program capable of calculating the product of two complex numbers. Remember that the product of the two complex numbers + ib and w-c+d can be expanded as follows (a ib)(c id) (ac bd)i(ad bc) The program should be able to handle 32-bit signed and unsigned integers where the result fits in a 32-bit register. You do not have to handle overflow. All the procedures you write in this exercise should follow the caller/callee conventions outlined in Section 2.8 and the green sheet of the lecture textbook1. You should avoid using the frame pointer by only changing the stack pointer on entry and exit of a routine.

Explanation / Answer

a)

A non-leaf procedure is a function, which call’s other procedure within the program to process it.

Example :

1

2

3

4

5

6

7

8

9

int non_leaf_procedure()

{

  int return_value;

  ...

non leaf_procedure()

  ...

return thevalue;

}

b)

stack is generally named as abstract data type.
it will helps in collection of elements.
stack are very helpful at architecture level as means
of allocating memory and accessing memory.

C) generally overflow of signed numbers is used for addition,
subtraction,multiplication and sivison.
At the exception over flow will stop the program.

a) yes complex mul is a leaf procedure.

it does not call any function to perform

stack is generally named as abstract data type.
it will helps in collection of elements.
stack are very helpful at architecture level as means
of allocating memory and accessing memory.

C) generally overflow of signed numbers is used for addition,
subtraction,multiplication and sivison.
At the exception over flow will stop the program.

1

2

3

4

5

6

7

8

9

int non_leaf_procedure()

{

  int return_value;

  ...

non leaf_procedure()

  ...

return thevalue;

}

b)

stack is generally named as abstract data type.
it will helps in collection of elements.
stack are very helpful at architecture level as means
of allocating memory and accessing memory.

C) generally overflow of signed numbers is used for addition,
subtraction,multiplication and sivison.
At the exception over flow will stop the program.

a) yes complex mul is a leaf procedure.

it does not call any function to perform

stack is generally named as abstract data type.
it will helps in collection of elements.
stack are very helpful at architecture level as means
of allocating memory and accessing memory.

C) generally overflow of signed numbers is used for addition,
subtraction,multiplication and sivison.
At the exception over flow will stop the program.