Re: [cc65] Compiling Code to load at $C000

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-12-31 18:08:16


On Wednesday 31 December 2003 17:48, Ullrich von Bassewitz wrote:
> Hi!
>
> On Wed, Dec 31, 2003 at 07:51:23AM -0800, Payton Byrd wrote:
> > I'm trying to write a BBS in CC65 and want to be able
> > to target a specific memory address such as $C000 so
> > that I can simply load the program on a C64 from my
> > BBS and sys49152 to run it without the BBS being
> > removed from memory.  Does anyone have any
> > recommendations for this?
>
> You will have to use your own linker configuration and startup file. The
> documentation for the linker contains information on how to write your own
> linker config. For the startup file, it should be enough to use the
> existing one and remove the BASIC stub.

however, if what you want is an ordinary basic program plus "modules" written
in C, i would suggest the following:

a) make it so cc65 uses the memory from ~$9f00 - $cfff (just modify the start
address in the linker config)
b) use the usual pokes to limit the basic memory for your main program to
$0800 - $9eff

that way you can call cc65 compiled programs from basic easily, and you can
make use of the otherwhise unused memory under basic-rom ($a000-$bfff). ($c000-$cfff
only is *very* tight and probably not very practical for C programs)

oh and if you dont even want to waste those $100 or so bytes at the end of the
basic memory, you could aswell put the startupcode into the casette buffer or
sth. (mmmmh....isnt that how "c*base" called external modules? mmmh :))

gpz 

----------------------------------------------------------------------
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 : 2003-12-31 18:01:42 CET