Important: The information in this document is obsolete and should not be used for new development.
Fixed-Argument Passing Conventions
Fixed parameters may either be items used to call a fixed-argument type routine, or fixed items that precede the variable items in a variable-argument function call. In either case, fixed parameters must occupy a multiple of 4 bytes when pushed onto the stack, with padding added if necessary. Note that the data can actually be pushed in any order as long as the final alignment matches the required convention.
- Parameters of type
UInt8
,SInt8
, andBoolean
are pushed onto the stack as 1 byte of data (the least significant byte) along with 3 bytes of undefined padding.- Parameters of type
UInt16
andSInt16
are pushed onto the stack as 2 bytes (least significant) of data plus 2 bytes of padding.- Pointers to procedures and arrays are pushed normally (since they are 4 bytes long), as are
UInt32
,SInt32
, andfloat
data items.- Type
double
parameters are passed by pushing the memory image of the 8-byte item onto the stack.- Type
extended
parameters can be either 10 or 12 bytes long, depending on the development environment. For 10-byte items, 2 padding bytes are pushed onto the stack before pushing the parameter. A 12-byteextended
data item is pushed onto the stack normally (since it is a multiple of 4 bytes).- If the size of a data structure or
union
is not a multiple of 4 bytes, 2 padding bytes are added to the stack before pushing the parameter. Otherwise, the parameter is pushed onto the stack normally. In both cases, the memory image of the item is passed.- Bit field layout is not defined. You should not use bit fields in procedures or data structures that have shared library interfaces.