Re[2]: [cc65] statics in zero page

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-05-22 19:17:57


Hello Greg,

Wednesday, May 22, 2002, 6:48:43 PM, you wrote:

GK> That solution will be easier to do, after ld65's configure-scripts are
GK> "expanded."  Instead of providing the minimum zero-page space that is needed
GK> by the compiler, they should "allocate" the maximum contiguous space
GK> that is not used outside of the program.  For example, "c64.cfg" should say,

GK> "ZP: start = $02, size = $8E, type = rw, define = yes;"

thats a very nice idea indeed

for the sake of taking into consideration the special role the zeropage plays in 6510
based system i'd advance that idea a bit though.... that is, make some
mechanism that makes it possible to "lock" every single adress by
itself (that feature actually makes sence for ordinary ram aswell!,
that could aid a LOT with some advanced stuff like FPP routines and
alike which scatter all their data over the memory)
... ie, you may want to use some music-routine that uses
zeropage-locations $10, $20,$30, and $a0-$ae (stupid example yes ;=))
...
   "ZP: start = $02, size = $8E, lock=$10,$20,$30,$a0-$ae, type = rw, define = yes;"

in in essence what i want to say is, the allocated memory block
shouldnt need to be one continues chunk (should be trivial to make the
linker sort the symbols by size and let it choose the best place for
them - ofcoz the largest continous block will limit your max. size of
symbols and to many locked locations would make a section hardly
useable, thats however up to the user then ;=))

GK> I agree that "it won't fit" is the only reasonable reaction when ld65 runs out
GK> of room -- in any memory-area.  The linker cannot know our goals;
GK> so, it would not know which variables
GK> are merely nice-to-have-sitting-down-there-if-there-were-space.  It is our job
GK> to adjust the code, in order "to shoehorn" it into the targets.

however, the linker could still place symbols that wont fit in
zeropage in .bss automagically (should issue a warning though) .... OR
it may be better to define a "common" section in the linkerscript
simelar to whats done in gcc (all symbols that "dont fit" otherwhise
go there)

-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-05-22 19:16:15 CEST