[Coco] CoCo 3 MMU test for all

jdaggett at gate.net jdaggett at gate.net
Mon Jan 21 19:00:48 EST 2008


On 21 Jan 2008 at 18:12, Robert Gault wrote:

> 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
> 
> EDTASM gives the following:
> 
>   ldb 0,x     $E6 $00

$E6 is the opcode for load ACCB and tells the 6809 that adressing mode is indexed mode. 
Also it tells the 6809 that there is a post byte to load in the next machine cycle.

A post byte of $00 is decoded as :

bit# 7  "0" - nonindirect indexed mode with 5 bit offset
bits#6 and 5 "00" - means the Xregister is used as the index pointer. 
bits#4 to 0 - "00000" is the twos compliment of the five bit offset. 

there  is no other bytes to load to calculate the offset. 

>   ldb  ,x     $E6 $84

This tells the 6809 that the instruction is indexed with no offset. Therefore there is not 
another byte to read to calcualte the offset. 


> 
> So, the code is different.
> 
Yes the code is different but the results should yield the same data that is loaded into 
ACCB. 

james



More information about the Coco mailing list