[Coco] Solution to switch between 6809 and 6309

Arthur Flexser flexser at fiu.edu
Mon Jun 15 02:24:05 EDT 2015


Another example is where the undocumented 6809 opcode $3E is used, a handy
way to get a single byte equivalent to pressing the reset button.  But it
gets vectored to the illegal-opcode address, probably crashing the CoCo,
when used with a 6309.

Art

On Sun, Jun 14, 2015 at 5:04 PM, Darren A <mechacoco at gmail.com> wrote:

> On Sun, Jun 14, 2015 at 2:30 PM, Arthur Flexser wrote:
>
> > Bill, I agree with you about there being no need to switch back and forth
> > between 6809 and 6309, but I'd put compatibility at more like 99.9%.  I
> > once did receive a Basic program that turned out not to work right on
> > account of my having a 6309 installed.  The author, who was not an
> assembly
> > language programmer, used an EXEC he found listed in some handy guide
> > somewhere.  It jumped into the middle of a ROM instruction, and worked
> okay
> > with a 6809 because the first byte executed was an illegal opcode and was
> > therefore ignored by the 6809 under which the program was developed.  But
> > when I tried the program with a 6309, the 6309 vectored the illegal
> opcode
> > to its error handler address, which hadn't been initialized, and the
> > program crashed.  So, no 101% compatibility, or even 100%.   But close.
> >
>
>
> Another situation I have seen is where one of the invalid register
> encodings has been intentionally used with the TFR instruction.  This
> undocumented "feature" can be used on a 6809 to load the value $FF into the
> DP resgister without having to use A or B as an intermediate.  Running the
> same code on a 6309 will have different behavior since all of the encodings
> are valid on that CPU.
>
> - Darren
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list