[Coco] 6309 Weirdness ??

Darren A. darccml at hotmail.com
Wed May 16 15:15:42 EDT 2007


>From: (tim lindner)
>Subject: Re: [Coco] 6309 Weirdness ??
>Date: Wed, 16 May 2007 10:44:19 -0700
>
>tim lindner <tlindner at macmess.org> wrote:
>
> > Darren A. <darccml at hotmail.com> wrote:
> >
> > > The question this raises:  Should MESS be updated to emulate the 
>"glitch"?
> >
> > Yes. I'll be doing my own tests and updating the 6309 core accordingly.
> >
> > This is a very interesting anomaly you've found.
>
>As an aside, if you have a patch for the 6309 core in MESS, that'd be
>cool also. :)
>
>--
-

Sorry Tim, I don't really want to touch the MESS code; I might make it 
worse.

I have found another difference between MESS and a real 6309 when the CC 
register is specified as the destination.  It appears MESS doesn't set any 
CC flags based on the operation performed, but merely stores the result in 
CC.  Here is an example:

    LDA   #1
    TFR   A,CC
    SUBR  A,CC

On MESS this produces 0 in the CC register.  On hardware, it produces 4 in 
the CC register because, since the result of the subtraction is 0, the Z 
flag is set.

I put together a diagram which I believe shows the logic flow for these 
instructions. You can find it here:

   <http://www.coco3.com/users/DarrenA/6309_RtoR.pdf>

The diagram doesn't yet show any details about using mixed-size registers, 
but it does illustrate how the final CC value is determined when it is 
specified as the destination register.

I hope any tests you do will be able to confirm or correct my findings, as I 
am trying to create yet another reference manual for the 6309. In the 
process, I've been performing exhaustive tests of the added instructions so 
I could fill in the gaps where the existing documentation falls short.

Darren

_________________________________________________________________
More photos, more messages, more storage—get 2GB with Windows Live Hotmail. 
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507




More information about the Coco mailing list