This shows you the differences between two versions of the page.
cc65:parameter_passing_and_calling_conventions [2010-05-01 19:27] uz |
cc65:parameter_passing_and_calling_conventions [2010-05-30 18:44] (current) uz |
||
---|---|---|---|
Line 32: | Line 32: | ||
Prototype: | Prototype: | ||
- | <code> | + | <code c> |
void foo (unsigned bar, unsigned char baz); | void foo (unsigned bar, unsigned char baz); | ||
</code> | </code> | ||
Line 48: | Line 48: | ||
Example code for accessing bar. The variable is in ''A''/''X'' after the code snippet: | Example code for accessing bar. The variable is in ''A''/''X'' after the code snippet: | ||
- | <code> | + | <code asm> |
ldy #2 ; Offset of high byte of bar | ldy #2 ; Offset of high byte of bar | ||
lda (sp),y ; High byte now in A | lda (sp),y ; High byte now in A |