[fpc-pascal]Default calling convention

Peter Vreman peter at freepascal.org
Mon Jun 28 07:52:49 CEST 2004

> Hello,
> I noticed that, with FPC 1.9.4, the (default) calling convention
> "register" depends on the fact that a routine is or is not embedded
> in an other routine.
> With "proc(A,B,C: Longint);", if "proc" is not embedded then
> eax = A, edx = B and ecx = C but if "proc" is embedded then edx = A,
> ecx = B and C is on the stack.
> Is this convention definitive or temporary? I am not sure it is
> definitive since it makes the code of assembler routines dependent
> on their status: embedded or not.

The framepointer of the parent function is passed in EAX

More information about the fpc-pascal mailing list