Hi! On Sat, Nov 17, 2007 at 09:22:00PM +0100, Andreas Koch wrote: > What possibilities exist to handle that situation? There are several things you can try: * Optimize for size. * Rewrite parts of the code using chars instead of ints and so on. * Use more than one code segment. * Reuse the memory that contains initialization code for data. * Load data from separate files instead of packing them into the executable. * ... > So, could i: > > 1) load the app to 0400 instead of 0800 and still start it normally? No. The compiled program has a BASIC header that does a SYS into the machine code. Loading it to $400 will prevent this. You can, however, carefully craft the executable image so that the BASIC header is still in place at $800. A probably better way is to place part of the BSS at $400, the casette buffer, etc. > 2) could i switch i/o-area and/or Kernal to RAM and use these areas for > code? (how much of the kernal is needed - i need to use file-i/o?) The runtime and C library assumes that the kernal is in place as it will do direct calls to the kernal ROM. You will have to select the functions you're calling carefully, if you're going to bank out the kernal. > 3) is it possible to split code into non-continous memory regions > (without doing it "by hand" in assembly) Yes. You may use #pragma codeseg. > 4) i have a 2k const array for the charset - what is the best method for > not wasting that memory, after the charset has been copied to its > final destination. Can i locate one of my global arrays of structs at the > same location? Yes. You can also place uninitialized data in the cassette buffer or other places. > 5) can i place the arrays with sprite data at a 64 byte boundary so they > can be used directly without relocating? Place them into a separate segment that has the proper alignment. > 6) Other suggestions? See above. Regards Uz -- Ullrich von Bassewitz uz@musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Mon Nov 19 21:22:32 2007
This archive was generated by hypermail 2.1.8 : 2007-11-19 21:22:37 CET