Question: Write a 32-bit x86-64 assembly language program that reads two complex numbers, each having real and imaginary part of type double , from an input

Write a 32-bit x86-64 assembly language program that reads two complex numbers, each having real and imaginary part of type double, from an input textfile. It then writes to an output textfile the product and the division of the two numbers as well as the reciprocal of the first number.

Note:

Your program must define the complex numbers as appropriate structures.

Your program must use procedures: multiplyComplex, divideComplex, and reciprocalComplex to do the required computations.

These procedures must have no input or output statements.

Each of the procedures must be called using the C-calling convention and they must return the real and imaginary values of the result in the EAX and EBX registers respectively.

The input and output of your program must be done in the main procedure.

 Write a 32-bit x86-64 assembly language program that reads two complex

Hint: The relevant formulas are (x + yi)(u + vi) - (xu - yv) + (xv+ yu)a Sample input file 5.0 6.0 3.0 -2.0 Sample output file Multiplication 27.00000 + 8.00000i Division 0.23076 + 2.15384i Reciprocal 0.08196- 0.098361 Multiplication-2.00000 + 26.00000i Division 0.64706 0.411761 Reciprocal 0.14706 - 0.088241 2.0 4.0 5.0 3.0 Hint: The relevant formulas are (x + yi)(u + vi) - (xu - yv) + (xv+ yu)a Sample input file 5.0 6.0 3.0 -2.0 Sample output file Multiplication 27.00000 + 8.00000i Division 0.23076 + 2.15384i Reciprocal 0.08196- 0.098361 Multiplication-2.00000 + 26.00000i Division 0.64706 0.411761 Reciprocal 0.14706 - 0.088241 2.0 4.0 5.0 3.0

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!