Question: pleaaase help me quickly The following program is written in C++ language. rewrite the program in assembly language taking into the consideration the poins below:
The following program is written in C++ language. rewrite the program in assembly language taking into the consideration the poins below: int Calculate (int varl, int var2, int var3) { int count = 3; int z = 5; return (varl+var2+var3) /count + z; } void main() { int x=10,y=5,w=6; int result=Calculate(x,y,z); } 1. The procedure receives its parameters (of type Dword) in the stack 2. The procedure declares two local variables: count and z of type Dword (dont use LOCAL directive) 3. The procedure should reserve the value of any used register. 4. The procedure returns the result in EAX register. The following program is written in C++ language. rewrite the program in assembly language taking into the consideration the poins below: int Calculate (int varl, int var2, int var3) { int count = 3; int z = 5; return (varl+var2+var3) /count + z; } void main() { int x=10,y=5,w=6; int result=Calculate(x,y,z); } 1. The procedure receives its parameters (of type Dword) in the stack 2. The procedure declares two local variables: count and z of type Dword (dont use LOCAL directive) 3. The procedure should reserve the value of any used register. 4. The procedure returns the result in EAX register
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
