Question: Write a procedure named ShowParams that displays the address and hexadecimal value of the 32-bit parameters on the runtime stack of the procedure that called

Write a procedure named ShowParams that displays the address and hexadecimal value of the 32-bit parameters on the runtime stack of the procedure that called it. The parameters are to be displayed in order from the lowest address to the highest. Input to the procedure will be a single integer that indicates the number of parameters to display. For example, suppose the following statement in main calls MySample, passing three arguments:

INVOKE MySample, 1234h, 5000h, 6543h Next, inside MySample, you should be able to call ShowParams, passing the number of parameters you want to display:
MySample PROC first:DWORD, second:DWORD, third:DWORD paramCount = 3 call ShowParams, paramCount ShowParams should display output in the following format:
Stack parameters:
---------------------------
Address 0012FF80 = 00001234 Address 0012FF84 = 00005000 Address 0012FF88 = 00006543

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 Implementing Programming Languages Questions!