Re: Re: [cc65] bank switching/retro replay?

From: Thomas Giesel <>
Date: 2009-11-10 13:35:32

> But writing such code that covers all cases is rather
> difficult. Especially if the caller needs to get banked out, before the callee
> is invoked.

Maybe not the best, but at least a first idea:

functions with this attrbute could be called like this:
1. Put arguments on stack
2. Put bank number on stack
3. Put function address on stack
4. Call generic trampoline function

This attribute may imply that the code has fastcall convention (why not...) and that it must not be used in an IRQ-handler. They cannot be used in absence of a prototype.

Of course it's not useful to call "cheap" functions in this way.



To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 10 13:35:41 2009

This archive was generated by hypermail 2.1.8 : 2009-11-10 13:35:43 CET