Re: [cc65] bank switching/retro replay?

From: SHAWN JEFFERSON <sjefferson1shaw.ca>
Date: 2009-11-10 01:24:33
----- Original Message -----
From: Marc 'BlackJack Rintsch <marc@rintsch.de>

> It doesn't, you have to supply the trampoline code.  
> Calling such 
> a "banked" function puts the bank and address within the bank 
> into 
> known locations and then calls the trampoline code 
> `__sdcc_banked_call`.  This code saves the current bank 
> onto the stack 
> changes the bank and calls the function.  On return 
> `__sdcc_banked_ret` 
> is called which switches back to the callers bank.  The two 
> functions 
> are of course dependent on the target hardware and have to be 
> supplied 
> by the programmer.

I could see something like that being useful.  How does it deal with the library runtime code?  Do you have to load it into a portion of memory that doesn't get banked out?

Ullrich, Is there currently any way at compile time to output what segment a piece of code is in, that could be used in a function to automate the banking?  ie. so I could write a function that takes this argument and then switches to the correct bank without having to rebuild the banking table all the time... 
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 10 01:24:53 2009

This archive was generated by hypermail 2.1.8 : 2009-11-10 01:24:56 CET