Re: [cc65] Extended memory

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-11-21 00:43:29


Hi!

On Wed, Nov 20, 2002 at 11:48:49PM +0100, groepaz wrote:
> well... i'd say thats the responsibility of the programmer...

Unfortunately, a programmer does not know, which modules from a library
contain code with these requirements.

> i see 2 possible solutions here...
[...]

Wait... I forgot, that I did this before and that there is an easy solution:-)

Just place the code that has to go into low memory into a special segment
(which is always the same, regardless of the module). Then place this segment
as first segment into the memory area using the linker config. In fact, this
approach does exactly the same as your suggestion of a "place at the
beginning" linker command. The C128 uses this solution, since the interrupt
handler for the RS232 module has to go into low memory.

There is still the problem that the segment can exceed the non banked memory,
but it is a solution that works with the current capabilities.

> how do you go through the build/install cycle then after having
> changed stuff in the compiler or library code? i mean... manually
> going through the directories and typing make and copying stuff to
> /usr/bin etc pp just isnt really acceptable when there is a shell or
> make util that could easily do that kinda boring work for me ,=)

There are only two directories: src and libsrc. When I've changed something in
the libsrc directory, I enter

        (cd ..; make -s c64lib)

and when working on the compiler or any other of the binaries, a simple

        make -f make/gcc.mak

is enough. Since the bash does have the "!" operator to repeat old commands,
the latter may also be abbreviated as

        !make

Copying stuff into /usr/bin is not needed, and not a good idea. First, I'm
using the full path to the compiler in my makefiles. Most tests are done in a
"test" directory that is part of my cc65 tree, and the makefile in this
directory contains the lines

        SYS	= pet

        CC65_LIB= ../libsrc
        CRT0   	= $(CC65_LIB)/$(SYS).o
        CLIB	= $(CC65_LIB)/$(SYS).lib
        CC     	= ../src/cc65/cc65
        AS	= ../src/ca65/ca65
        LD	= ../src/ld65/ld65

Second, it is always better to have the files in /usr/bin managed by a package
manager. So I'm usually building RPMs when I want to have a new compiler
version installed systemwide. With the new fresh snapshot RPMs built each
night, this will become even easier in the future:-)

So this is neither complicated nor boring. Besides that, a top level
"makefile" could just be a shell script that does

        make -C src -f make/gcc.mak
        make -C libsrc -s

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
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-11-21 00:43:42 CET