Shawn Jefferson kirjoitti: > > How difficult, or possible would it be to allow the zeropage regbank > size to be specified in the linker config script, or via a pragma > command? On the Atari platform there is about 60-70 bytes of free > zeropage for use, and I’d like to easily use them for local variables > without the complexity of allocating and managing them myself. > > I know there is some overhead in saving and restoring the zeropage > variables, and at some point doing this negates the benefit you get. > It would be nice if the compiler could tell you when that is the case > or not as well, but that may be much more difficult. > In Atari Lynx target there is already two segments ZEROPAGE and EXTZP that is mapped tp ZP and USERZP is free to use. MEMORY { USERZP1: start = 0, size = 205, type = rw, define = yes; USERZP2: start = 0, size = 205, type = rw, define = yes; ZP: start = 205, size = 51, type = rw, define = yes; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; EXTZP: load = ZP, type = zp; USERVAR1: load = USERZP1, type = zp; USERVAR2: load = USERZP2, type = zp; } Copying the USERZP1 segment into conventional memory when swapping from one code block to the next would not be so bad. (And quite simple in my opinion.) -- Karri ---------------------------------------------------------------------- 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 Feb 3 10:24:44 2009
This archive was generated by hypermail 2.1.8 : 2009-02-03 10:24:46 CET