Re: [cc65] Some unrelated patches to ca65, documentation and the build system for dicussion

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-08-20 21:14:52
Hello,

just a small clarification WHY I want/need this feature:

* On Sun, Aug 19, 2012 at 02:24:14PM +0200 Ullrich von Bassewitz wrote:
> 
> Hi!
> 
> On Sun, Aug 19, 2012 at 12:37:59PM +0200, Christian Krüger wrote:
> > Sounds like a typical case for a 'warning' to me...
> > (BTW: Is there something like a 'pragma' to switch a specific
> > warning on/off ?)
> 
> Well, I would estimate that this is an error in more than 99.5% of all cases.
> In all the time writing code using ca65, I had never a need to switch off the
> errors.

I am rebuilding the BASIC + KERNAL of VIC20 + C64, as well as the DOS
ROM of 2031LP, 1540, 1541, 1570, 1571 and 1571CR in all original CBM
variants I know. Especially in the case of the floppy, there are many
patches that are moved here or there, depending on the exact revision of
the ROM.

Until now, I reproduced the exact byte sequence of the ROMs by adding
the patches at every possible place. Another way was to have a macro
that placed it correctly.

But now, I am changing to segments, so I can write something like this:


        .segment "CODE1"
        ...

        .segment "BEFOREPATCH"
        ...

        .segment "PATCHJMP"

        jmp PATCH

        .segment "PATCH"

PATCH:  ...
        jmp BACK

        .segment "CODE2"

BACK:   ...


(actually, it is a little more complicated than presented here).

So, I can place the PATCH at different locations by having an
appropriate linker file only. In variants that do not have the patch, I
can even regenerate the "original" code by putting segments PATCHJMP and
PATCH into a dummy memory area that is not added to the output file.

Having done this, I found out that a Bcc from CODE2 to CODE1 will always
fail. That's why I came up with my question in the first place.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
----------------------------------------------------------------------
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 Aug 20 21:15:20 2012

This archive was generated by hypermail 2.1.8 : 2012-08-20 21:15:23 CEST