<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 06 Mar 2005 21:17:37 +0000 (GMT)
From   : "A.Weston" <a.weston2@...>
Subject: Re: [Fwd: Re: Assembler bug]

In <URL:news:local.misc> on Sat 05 Mar, Tom Seddon wrote:
> Argh, I replied straight to Mr Weston! ****. Anyway here is my reply for 
> general benefit(?)...
>
Easily done :)

<snip>
> 
> For pass 1, when the assembler assembles "LDA Z" it creates the most
> general opcode, because it doesn't know how 'big' the address held by Z
> is. It also gives a value to the P label.
> 
> On pass 2, the JMP is fixed up using the address of P. But the "LDA Z"
> has become smaller, because the most concise encoding of the LDA
> instruction can be determined. This moves the location of P, but the JMP
> referring to it has already been fixed up, and thus incorrect code is
> created.
I see thanks that's much clearer!


A.Weston
-- 
Staffordshire, UK of GB&NI. 
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>