OPTLINK
The
OPTLINK call interface convention provides a faster call than the SYSTEM
convention.
The following rules apply to OPTLINK:
- Program-names are prefixed with a question-mark character (?).
- Parameters are pushed from right to left onto the stack.
- The caller removes the parameters from the stack.
The registers are used as follows:
- The general-purpose registers EBP, EBX, EDI, and ESI are preserved
across the call.
- The general-purpose registers EAX, EDX, and ECX are not preserved
across the call.
- Floating-point registers are not preserved across the call.
- The three conforming parameters that are lexically leftmost (conforming
parameters are 2-byte and 4-byte binary items, and all pointer types)
are passed in EAX, EDX, and ECX, respectively.
- Up to four floating-point parameters (the lexically first four) are
passed in extended-precision (80-bit) format in the floating-point register
stack. All other parameters are passed on the runtime stack.
- Space for the parameters in registers is allocated on the stack,
but the parameters are not copied into that space.
- Conforming return values, with the exception of 64-bit binary
items, are returned in EAX. In the case of 64-bit binary items, the most
significant 32 bits are returned in EDX and the least significant 32 bits
are returned in EAX.
- Floating-point return values are returned in extended-precision
format in the topmost register of the floating-point stack.
- Calls that return aggregates pass a hidden first parameter that is
the address of a storage area determined by the caller. This area becomes
the returned value. The hidden pointer parameter is always considered
nonconforming, and is not passed in a register. The called program must load
it into EAX before returning.
related references
CALLINT
ENTRYINT
Compiler-directing statements
|