Hi guys,
supposing I have the c++ line
void callback(int 1, int 2, int 3)
{
do something with ints;
}
Where the ints have been populated in other areas of the program. How would this translate in asm? I have written a quick one using c and debugged with ollydbg, but lost myself. :/
Cheers in advance
supposing I have the c++ line
void callback(int 1, int 2, int 3)
{
do something with ints;
}
Where the ints have been populated in other areas of the program. How would this translate in asm? I have written a quick one using c and debugged with ollydbg, but lost myself. :/
Cheers in advance
Masm Code:
Juts like in C++ the int value is passed. for the address of the int you would invoke the like saying something like
invoke callback, int1, int2, int 3
callback proc int1:DWORD, int2:DWORD, int3:DWORD
mov eax, int1
mov edx, int2
ret
endp
Juts like in C++ the int value is passed. for the address of the int you would invoke the like saying something like
invoke callback, addr int1, addr int 2, addr int3
callback proc int1addr:DWORD, int2addr:DWORD, int3addr:DWORD
mov eax, int1addr
mov , 17h
endp
Nice simple and to the point, cheers