Hi guys, i´m having some problems with the stack pointer of a function.
I translated the benchmark app from Steve
http://masm32.com/board/index.php?topic=208.0 and built a new function like this:
call BenchMarkAlgo D$nam1, 1, av1, Algoritm1
Proc BenchMarkAlgo:
Arguments @Name, @Indicator, @pav, @AlgoOffset
call SzCmp D@Name, {B$ "Unused ", 0}
If eax = 0
call Indicator D@Indicator
call 'kernel32.GetTickCount'
push eax
mov esi iterate
B1:
call D@AlgoOffset
sub esi 1 | jne B1<
call 'kernel32.GetTickCount'
pop ecx
sub eax ecx
mov edi D@pav
add D$edi eax
call 'kernel32.SleepEx' algo_delay, 0
End_If
EndP
Proc Algoritm1:
Uses esi, edi
call utoa esi, D$pbuf
EndP
The problem is that the app is crashing due to bad parameters when using the pointer to Algoritm1 as a member of a function
I´m quite sure that call D@AlgoOffset must be something like
call D@AlgoOffset D@ARg1, D@ARg2 ....(with the proper members names, i mean @Name, @Indicator, @pav, @AlgoOffset)
And Algoritm1 must also have parameters such as:
Proc Algoritm1:
Arguments @Arg01, @Arg02.....(With proper names ?)
Uses esi, edi
call utoa esi, D$pbuf
EndP
The question is how many ???? How to count them is i pushed onto the stack the Algoritm1 function ???