Datasheet
102 PSoC Designer IDE Guide, Document # 001-42655 Rev *B
Assembler
Functions with more complex input parameters or return values can be written using these tables.
Note that the #pragma fastcall16 has replaced #pragma fastcall and use of #pragma fastcall is dep-
recated.
Table 5-6. Pragma Fastcall16 Conventions for Argument Passing
Argument Type Register Argument Register
Single Byte A The argument is passed in A.
Two Single Bytes A, X The first argument is passed in A, the second in X.
Double Byte X, A The MSB is passed in X, the LSB in A.
Pointer A, X The MSB is passed in A, the LSB in X.
All Others None
Arguments are stored on the stack in standard byte order and in
reverse order or appearance. In other words, the MSB of the last
actual parameter is pushed first and the LSB of the first actual
parameter is pushed last.
Table 5-7. Pragma Fastcall16 Conventions for Return Value
Return Type
Return
Register
Comment
Single Byte A The argument is returned in A.
Double Byte X, A The MSB is passed in X, the LSB in A.
Pointer A, X The MSB is passed in A, the LSB in X.
All Others None
Use a pass-by-reference parameter or global variable instead of
returning arguments longer than 16 bits.