According to Orlando Llanes:
Using GPC's asm statement allows us to set the function result with an
ASM statement, but how do I set the result of a function through an external assembly routine? [...]
Just guessing - but educatedly (-:
This is defined by the environment (the operating system, in essential) the compiler has to work in.
AFAIK, DJGPP defines 32-bit function return values to be returned in the `eax' register. I do not know about longer values, but you can look it up from `gpc -S foo.pas' *without* optimization. (With optimization, GPC might deviate from this convention in cases where function are always called from the same place where it increases performance to return a value in a non-standard register.)
Peter