[Coco] CoCo 3 MMU test for all

Darren A. darccml at hotmail.com
Mon Jan 21 19:04:33 EST 2008


> On 21 Jan 2008 at 17:50, Arthur Flexser wrote:
> 
>> You might want to check whether your assembler assembled LDB 0,X and
>> LDB ,X using the same postbyte for both, if both gave you $38.  I'm
>> pretty sure LDB 0,X, if assembled correctly, should have yielded $78,
>> same as PEEK does.
>> 
>> Art
> 
> How? LDB ,X and LDB 0,X should yield the same results from any 
> assembler.
> 


Most 6809 assemblers I have used assemble an indexed operand like "0,X" as a 5-bit displacement postbyte. In order to get the zero-displacement postbyte, you cannot have anything preceding the comma.

I would imagine that some assemblers provide an optimization option for these occurences, but I believe this has always been the 'accepted' behavior.


> Most assemblers should realize that LDB 0,X is indexed mode with no 
> offset. Even if it does compute an offset it will either be a 5 or 8 bit offset of 
> zero. The last time a value was added to zero, the value was returned. 
> Suggesting that a different value is read would imply that the two 
> instructions are reading from different addresses. 
> 


The issue here is that the address being read is a hardware register which has two 'floating' bits. The actual value read may be affected by residual noise on the data bus, and the previously fetched opcode byte could play role in this.

Darren


_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx


More information about the Coco mailing list