Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What do instructions $14 and $15 REALLY do?

36 views
Skip to first unread message

Bruce Tomlin

unread,
Dec 9, 1996, 3:00:00 AM12/9/96
to

Being both an old time 6809'er (had a CoCo back around 1982, made a
single-stepping monitor program, and Infocom interpreter, and a *lot* of
patches to BASIC) and a new time 6809'er (programming embedded controllers
for automated fueling systems), I've been aware of the general layout of
6809 illegal instructions for quite some time now. Most of them simply
decode to the "adjacent" instruction. Two of the SWI variants use the
RESET and the FIRQ vectors. (The FIRQ variant pushes ALL the registers,
FYI.) Store Immediate only stores the second byte, apparently causing a
write with a tri-stated data bus for the first byte. Illegal TFR and EXG
registers are always $FFFF, and mis-aligned transfers have $FF in the high
byte. There are couple more instructions that do wierd but useless stuff,
including one that reads PC+2 and does nothing with it.

But the $14 and $15 instructions have always defied my analysis, because I
don't have anything to record what the bus is doing when they're running.
At near as I can tell, they are some sort of factory test instruction to
exercise the bus. All I know is on the baby ICE at work (a *single* CPU
design, which I find fascinating), the display flickers all 8's, and the
only way to recover is to hit reset. The big HP emulator is no use,
because it automatically stops the CPU on any illegal instruction, so I
can't trace the bus activity.

Not that I plan or even expect to ever use these things, but I am curious
about what the heck $14 and $15 are doing that causes the CPU to go off into
never never land.

Oh, and for a spiffy 6809 disassembler, look around in:

ftp://ftp.crl.com/users/bt/btomlin

I've ported it to do 6502 and Z-80, but I think I only ever got around to
releasing the 6809 version. Distributed "SCID". (Source Code Is
Documentation.)

Ian Glading

unread,
Jan 1, 1997, 3:00:00 AM1/1/97
to

In article <58ivu6$c...@crl12.crl.com>, Bruce Tomlin <bto...@crl.com>
writes
>Being both an old time 6809'er <snip>

>But the $14 and $15 instructions have always defied my analysis, because I
>don't have anything to record what the bus is doing when they're running.

Believe it or not I find these instructions (or at least I believe its
them) very usefull. I have allways known them as HCF (halt and catch
fire)and understood this to be a motorola in house test mode. The
address bus becomes a ripple counter so the thing cycles through memory
doing read cycles. This is handy if you are trying to fix a dead board
as it means you can verify the address decoding etc. The trick is to get
a processor which has crashed anyway into this mode, shorting out a
couple of address lines with the scope probe usually works !
One final thing in this mode the damn thing masks the NMI !
| --- --- Email: I...@icgelec.demon.co.uk
| | | Phone: 01733 557447
| | | Fax: 01733 893275
| | | | Snail: I.C.G. Electronics
| . --- . --- . 35 Second Drove Industrial Estate
E L E C T R O N I C S Fengate, Peterborough, U.K. PE1 5XA

0 new messages