Re: [cc65] latest stable version?

From: Greg King <>
Date: 2014-07-24 20:15:02
On 2014-07-18 7:43 AM, Frank Buss wrote:
> Bill Buckels wrote:
>> I really think it's more important for you just to get started; and, after
>> the first week or so, if your experiences with the compiler are as positive
>> as mine, you'll probably be quite comfortable with cc65.
> I'm already using it. And, looks like the version "V2.14 - Git 6df4205" is unstable; or, I'm doing something wrong. This program:
> built with "make" in Cygwin, crashs with a CPU Jam in VICE. The same project (except for one line changed in ld.cfg) works with "cc65 V2.13.3, SVN version: 5495". So, I think the answer for me is to continue using V2.13.3, until there is a tested release.

The bug isn't in the cc65 project's code; it is in the documentation (I 
give a nod to Bill).  It doesn't give a good description of how 
interrupts are handled by programs that are built by the cc65 tools. 
And, the docs. don't describe how versions 2.13 and 2.14 do it differently.

There are three main sections:
1) Connector: it connects and disconnects the program's code to and from 
the computer's ROM or Operating System.
2) Bridge: it catches the interrupts from the ROM or OS; and, gives them 
to the program's handlers.
3) Interruptors: they take care of each interrupt.

In cc65 Version 2.13, the connector and the first part of the bridge are 
in the start-up file -- they are built into every program, even when 
they aren't needed.  In cc65 V2.14, they are in separate files (inside 
the library) -- ld65 and the configuration file will link them into a 
program only when a programmer writes some code that uses interruptors.

In V2.13, the connector doesn't plug into the ROM or OS if there are no 
interruptors.  But, in V2.14, the connector always plugs in (it assumes 
that it wouldn't be in the program if interruptors aren't there).


Your crt0.s file was adapted from version 2.13; it has the bridge.  Even 
though that bridge code isn't used, it still links to the other part of 
the bridge.  In V2.14, that second part links everything else into the 
program!  Therefore, the connector plugs in; and, the V2.14 bridge tries 
to call interruptors that don't exist -- CRASH!

If you comment out one line in your start-up file, then your test code 
will do what you expect it to do, even if it was built by the version 
2.14 tools:

         cld             ; Just to be sure
;        jsr callirq     ; Call the functions
         jmp IRQInd      ; Jump to the saved IRQ vector

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Jul 24 21:22:09 2014

This archive was generated by hypermail 2.1.8 : 2014-07-24 21:22:12 CEST