Re: [cc65] LUnix

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-01-05 22:20:09


On Sun, Jan 05, 2003 at 03:52:13PM -0500, Greg King wrote:
> > 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.

This is correct and it's not a bug. While the base of the memory area is
written into zpbase, the o65 specs say that the values in the segments are the
actual values of the location to which the segment is assembled. So anything I
said in the above paragraph was correct with the exception of the last
sentence: Addresses are always "segment-base+offset-in-segment".

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 : 2003-01-05 22:20:15 CET