[Coco] CoCo 3 MMU test for all

jdaggett at gate.net jdaggett at gate.net
Mon Jan 21 19:51:45 EST 2008


On 21 Jan 2008 at 17:04, Darren A. wrote:

> 
> > 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.
> 

With an 0,X assembler directive most assemblers will opt to a 5 bt offset with the offset 
value being zero. This is the same instrruction as ,X with the exception that the 6809 takes 
one more machine cycle to execute an LDB 0,X than that of LDB ,X. 


> 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.
> 


The issue is the read from the GIME chip has no bit 6 an d 7 from the MMU registers. 
Therefore unless the actual iternal workings of the GIME chip are known, these bit may or 
maynot be tristated. The buss is left floating. The common read in Basic is $78. No other. 
This tends to lead me that it is not noise.

james



More information about the Coco mailing list