show procedure parameters

timer Asked: May 9th, 2013

Question Description

Need help with my Programming question - I’m studying for my class.

Program must be written in Assembly language.

You must INCLUDE

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, we make a call to ShowParams, passing the number of parameters:

MySample PROC first:DWORD, second:DWORD, third:DWORD

paramCount = 3

call ShowParams, paramCount

Suggestion: Run the program in Debug mode and examine the Disassembly window.  The following

is a sample of the expected output:

Stack parameters:


Address 0012FF80 = 00001234

Address 0012FF84 = 00005000

Address 0012FF88 = 00006543

Use these prototypes in your program:

 MySample PROTO first:DWORD, second:DWORD, third:DWORD

 ShowParams PROTO numParams:DWORD

Note: after displaying the addresses and hex value of each 32-bit parameter ShowParms MUST utilize WaitMsg to  pause the screen.

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors