Can I get some quick clarification/confirmation of the PDK calling convention? It's not documented in the SDCC manual.

Arguments:
- First/only 8-bit argument passed in A?
- Multi-byte arguments are passed in overlay memory. To reference in inline assembly, they are assigned names of "_<func_name>_PARM_<n>", where n is the 1-based left-to-right argument index.

Return values:
- 8-bit return values are in A.
- 16-bit return value has MSB in P, LSB in A. (Why not just both in P?)
- 32-bit return value - ???

Both A and P are expected to be clobbered by the callee, and saved by the caller?

Functions always return using 'ret' instruction? That is, no 'goto' shenanigans?

Are there any differences between PDK13, 14, 15?

Regards,
Basil Hussain


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to