show procedure parameters

Price: $25 USD

Question description

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.

Tutor Answer

(Top Tutor) Daniel C.
School: Carnegie Mellon University
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1826 tutors are online

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