Question: Sally the Programmer is writing her CS 17 homework assignment. The assignment asks her to write a function which calculates some values. She has written
Sally the Programmer is writing her CS 17 homework assignment. The assignment asks her to write a function which calculates some values. She has written the following function: procedure bar( data : int16 ); @nodisplay; @noframe; static iTemp : int16; iReturnAddress : dword; begin bar; // retrieve return address from the stack pop( iReturnAddress ); // retrieve 16 bits of padding from the stack pop( iTemp ); // retrieve actual parameter from the stack pop( data ); // do somework... mov( 0, EAX ); mov( 0, EBX ); mov( 0, ECX ); mov( 0, EDX ); inc( EAX ); add( EBX, EAX ); inc( EBX ); add( EBX, ECX ); inc( EDX ); ret(); end bar; Sally the Programmer thinks her programming job is finished. She offers you her code, believing it is working perfectly. You use it but report that your driver code which calls her code doesnt seem to be working correctly. Why? What needs to be done to Sallys code to make it work properly?
(HINT: There are two major problems in the code shown above...)
Please use HLA only. Also, I need this ASAP.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
