>>>>> "SC" == Sidney Cadot <sidney@jigsaw.nl> writes: SC> Is there documentation regarding the calling conventions used by SC> CC65? I need to mix C and assembly and I like to play by the SC> rules. Since Uz is out of town: Arguments are pushed on the stack in left to right order. If you're using __fastcall__ the last argument is instead put in A (lo) and X (hi). You can access args with lda (sp),y. When returning, you must have pulled everything off (jsr incspX, where X is the number of bytes you want to increase the pointer with), and pushed your return value. If you're using __fastcall__ the return value is instead returned in A/X, as above. -- ___ . . . . . + . . o _|___|_ + . + . + . Per Olofsson, arkadspelare o-o . . . o + MagerValp@cling.gu.se - + + . http://www.cling.gu.se/~cl3polof/ ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Thu Sep 2 08:27:50 2004
This archive was generated by hypermail 2.1.8 : 2004-09-02 08:27:59 CEST