Something like this works (use Irvine functions in place of printf, if you want).
include <path to Irvine32.inc>
mySample proto first:DWORD, second:DWORD, third:DWORD
showParams proto pCount:DWORD
includelib kernel32.lib
includelib user32.lib
includelib msvcrt.lib ; Use Irvine library function (WriteString?) in place of printf
includelib irvine32.lib
.data
Msg db 'Address %08X = %08X',10,0
.code
main proc
INVOKE mySample, 11111111h, 22222222h, 33333333h
call WaitMsg
INVOKE ExitProcess, 0
main endp
mySample proc first:DWORD, second:DWORD, third:DWORD
paramCount = 3
invoke showParams, paramCount
ret
mySample endp
showParams proc uses ebx pCount:DWORD
mov ebx, 0
@@:
cmp ebx, pCount
jae @F
lea ecx, [ebp+20+4*ebx]
mov edx, [ecx]
invoke printf, addr Msg, ecx, edx
inc ebx
jmp short @B
@@:
ret
showParams endp
end
Output:
Address 0093F7B8 = 11111111
Address 0093F7BC = 22222222
Address 0093F7C0 = 33333333
Press any key to continue...