Re: [cc65] Need help getting started with cc65 NES

From: Greg King <gngking1erols.com>
Date: 2005-12-07 13:52:17
From: Ullrich von Bassewitz; on November 21, 2005, at 01:41 PM -0500
>
> On Mon, Nov 21, 2005 at 11:26:37AM -0600, PH wrote:
> > The instruction at 0x0042702f referenced memory at 0x00000020.  The
> > memory could not be read.
>
> I think it's the same error that Oliver has already reported. The Linux
> version seems to work fine even when running under valgrind. So, I will
> have to boot the Windows machine to search for the problem, which is
> somewhat more work. I would be glad if you could retry once the windows
> problem is fixed. As a quick workaround, disable optimization. The bug is
> caused somewhere in the optimizer (if it's the same bug).

From: Ullrich von Bassewitz; on November 22, 2005, at 12:21 PM -0500
>
> On Mon, Nov 21, 2005 at 11:26:37AM -0600, PH wrote:
> > The instruction at 0x0042702f referenced memory at 0x00000020.  The
> > memory could not be read.
>
> If anyone is using the snapshot:  That error is fixed since yesterday
> evening.  Version 2.11.0 doesn't contain the new code, so it doesn't have
> that problem.

From: Shawn Jefferson; on November 22, 2005, at 11:52 PM -0500

> I get this error:
> The instruction at 0x0040f2ab referenced memory at 0xffffffff.
> The memory could not be read.
> CL65.EXE: Cannot execute `cc65': No error
>
> It's on a specific .c file I'm trying to compile with
> the latest snapshot that I just downloaded -- Atari
> target.  Other projects of mine compile properly.

From: Ullrich von Bassewitz; on November 27, 2005, at 03:50 PM -0500
>
> On Sat, Nov 26, 2005 at 08:26:56AM -0600, PH wrote:
> > I'm using the following to compile when I get a memory ref. error.  I'm
> > running win2k, and the win32 version of the compiler.
> >
> > c:\cc65nes\bin\cc65.exe -t nes -O -I c:\cc65nes\include helloworld.c
>
> I'm sorry, but that works without problems, here.

I found a bug with the same symptom -- (in the 2005-12-5 snapshot).  I hope
that it is the same bug.

It is in OptAdd3(), in "cc65/coptadd.c".  The L[] array is too small.  You
forgot that the CS_GenLabel() call looks at the line _after_ the code that
is being optimized.  So, Label gets a random, bad address (the visible
effect depends on what data happens to be sitting next to L[]).

[Don't forget to update the call to CS_GetEntries().]

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Dec 7 13:54:25 2005

This archive was generated by hypermail 2.1.8 : 2005-12-07 13:54:27 CET