Re: [cc65] LUnix

Date view Thread view Subject view

From: Greg King (gngking_at_erols.com)
Date: 2003-01-05 21:52:13


-----Original Message-----
From: Ullrich von Bassewitz
Date: Sunday, January 05, 2003, 03:13 PM
>
> On Thu, Jan 02, 2003 at 11:40:17PM +0100, Maciej Witkowiak wrote:
> > Looking at lunix.cfg for ld65 I see that ZEROPAGE segment
> > begins at $80 - are zeropage locations in o65 put with
> > $80+offset_in_zp_segment or just offset_in_zp_segment and it is up to loader
> > to relocate them using zp base address from header?
>
> Uuhhm... I have to admit that I don't know that currently. The whole o65
> generation is rather complex and there were several versions of the linker
> that got parts of it wrong. A quick look into the linker sources suggests that
> the value from the memory area is taken for the zpbase field in the header and
> that addresses are relative to the memory area. This would mean that the
> addresses are just "offset_in_zp_segment" and the loader must relocate them.

Ouch!  If that's the way that it is supposed to work, then I've been exploiting
a bug, all this time. :-/  It has been $80+offset, and relocation wasn't needed.

----------------------------------------------------------------------
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-01-05 21:53:50 CET