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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started