Question: Coding: submit all asm files to the LMS . SubTwo, Original Version. Create a function called SubTwo to receive two numbers ( the first in
Coding: submit all asm files to the LMS
SubTwo, Original Version. Create a function called SubTwo to receive two numbers the first in
EAX and the second in EBX and subtract them. Return the result of EAX EBX in EAX.
SubTwo, Another Version. Create another function called SubTwo that receives its arguments
on the call stack. Before calling, you must push the first number on the stack first, then push the
other number on the stack. Remember to set up the stack frame by pushing EBP and moving
ESP to EBP. Still return the same result in EAX. Remember to destroy the stack frame by popping
EBP from the stack and use the RET n instruction to remove the stack parameters without
popping them.
SubTwo, a Third Version. Create a third function called SubTwo that receives its arguments as
parameters. Your parameters must be called nOne and nTwo. Still return the same result in EAX.
Remember to use the INVOKE instruction to call this version of the function. Also dont forget to
put your PROTO in for the function if you write it below main!
Create a main procedure to collect two signed DWORD numbers and save them to memory. Use
each of your functions to subtract the two numbers. The results should be the same for all
three.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
