[fpc-pascal] PascalScript / FPC: parameters problems (need internals gurus I think)

Alexandre Leclerc alexandre.leclerc at gmail.com
Tue Aug 8 22:49:00 CEST 2006


The actual procedure that is called. It does some asm processing and
then calls the MyAllMethodsHandler2 that works with parameters. Maybe
this is there that there is a problem? (This is all in the
uPSRuntime.pas file)

procedure MyAllMethodsHandler;
//  On entry:
//     EAX = Self pointer
//     EDX, ECX = param1 and param2
//     STACK = param3... paramcount
asm
  push 0
  push ecx
  push edx
  mov edx, esp
  add edx, 16 // was 12
  pop ecx
  call MyAllMethodsHandler2
  pop ecx
  mov edx, [esp]
  add esp, eax
  mov [esp], edx
  mov eax, ecx
end;


2006/8/8, Alexandre Leclerc <alexandre.leclerc at gmail.com>:
> 2006/8/8, Michael Van Canneyt <michael at freepascal.org>:
> > The problem is more likely that all arguments are extended, which probably
> > means that the stack is used differently. Are they pushed on the FPU stack ?
>
> Ok, I found this procedure that is used to handle parameters... Maybe
> this is the actual asm code who is not good... ???

-- 
Alexandre Leclerc



More information about the fpc-pascal mailing list