[Coco] 6309/6809 opcodes with mixed 8/16 bit registers
Ciaran Anscomb
cocomalt at 6809.org.uk
Tue Nov 20 11:47:40 EST 2012
"Harry Hurst" wrote:
>
> One thing I've found, that may not be in your book, Darren, is that the
> supposedly "not allowed" modes [,R+] and [,-R] are actually functional on
> the 68B09E. They are "not allowed" in every reference I could find, and
> yet they work. I think most, if not all, assemblers disallow them, for
> good reason, but if the CPU encounters an instance of this, it will
> execute it just fine. The 6309 uses the [,R+] opcodes for some limited
> indexing with the W register. Here's a short list of these and other
> invalid-on-the-6809 indexing mode differences:
>
> CPU
> Postbyte 6809 6309
> $90 [,X+]("NA") [,W]
> $B0 [,Y+]("NA") [n16,W]
> $D0 [,U+]("NA") [,W++]
> $F0 [,S+]("NA") [,--W]
> $87 A,X (dup/$86) E,X
> $A7 A,Y (dup/$A6) E,Y
> $C7 A,U (dup/$C6) E,U
> $E7 A,S (dup/$E6) E,S
> $97 [A,X] (dup/$96) [E,X]
> Presumably $B7, $D7, and $F7 follow suit for the Y, U, and S registers and
> are duplicates of $B6, $D6, and $F6.
FWIW, I also have
1RRI1010 ($8A, etc.) -> ea = REG_PC | 0xff
(ie, PC with the lower 8 bits set to 1).
But I really need to re-verify that, and check whether bit 4 being set
indirects as expected.
Strangely though, I have $87 etc. down as being zero-offset (ie a
duplicate of $84, etc.), so it looks like I have to re-verify everything!
I don't have anything noted for 1RRI1110 ($8E, etc.).
..ciaran
More information about the Coco
mailing list