Am 21.10.22 um 19:31 schrieb Ori Idan:
I am not familiar with how SDCC does it but in C calling convention the function does not have to know the number of parameters, therefore can not adjust the stack. Only the caller can do it.
In C (the programming language), there are functions declared with variable arguments (i.e. those that have a ... in their parameter list). For those the callee doesn't know the number of arguments. And for those the stack parameters are always cleared up by the caller.
Philipp _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user