Re: [cc65] Loadable overlays

From: Payton Byrd <payton1paytonbyrd.com>
Date: 2006-07-27 20:47:21
This helps a lot and does bring up a lot of questions:

MMU Questions:
1) If the Kernel ROM is enabled, and there's 41K available to CC65, then bank is CC65 executing code in?
2) Can C code compiled with cc65 reenable the MMU and change the current bank by setting the correct registers without blowing up the cc65 runtime when the bank is returned to 0?

Linking Questions:
1) Is it possible to like the CC65 runtime library at the beginning of an executable so that the entry points to the methods and structs will never change?  
2) Would it be possible to link a collection of o65 files to a specific upper memory location and then create a custom link configuration that would allow a program to be linked with a static map to those entry points?  Maybe this is the way to implement linking question 1...


Payton

 -------- Original Message --------
> Hi!
> 
> From internal.txt:
> 
> ------------------------------------------------------------------------------
> C128:   The startup code will reprogram the MMU, so that only the kernal ROM
>         is enabled. This means, there are 41K of memory available to the
>         program.
> ------------------------------------------------------------------------------
> 
> The layout as far as I remember is $2000 (BASIC Start) up to the char ROM and
> I/O area.
> 
> o65 modules can be loaded to arbitrary addresses. The loader supplied with
> cc65 uses memory from the heap, but this can easily change to use other
> portions of the available system memory. However, load time linking is not
> supported by ld65 per se, so will have to either write o65 modules in
> assembler (without using the cc65 runtime), or use the same trick as Contiki
> does (link in a symbol tables with the absolute addresses of the runtime
> routines in the main program). The latter means that loadable modules do only
> run with exactly one version of the main program.
> 
> Linking programs for specific addresses is easily possible, but linking
> "without the runtime" is not, because this would in most cases leave
> unsatisfied external references. There may be solutions, but this depends on
> your problem.
> 
> I hope this information is at least helpful for a start. If you ask more
> detailed questions, I may be able to supply more detailed information.
> 
> 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. 



----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jul 27 20:48:12 2006

This archive was generated by hypermail 2.1.8 : 2006-07-27 20:48:15 CEST