6809 (was: Anybody ever use Aztec C for APPLEII?)

From: Dave Dunfield <dave04a_at_dunfield.com>
Date: Wed Apr 28 06:25:52 2004

>> I'm not as familiar with the 6809 as I am with the 6502... what differences
>> in architecture make it better? Larger stack frame? More (and larger)
>> registers?

> It also supports more addressing modes than the 6502 like position
>independant (indexed off PC) and indirect addressing (in C, this would be
>dereferencing a pointer). It also has a fairly orthogonal instruction set
>which also helps in compiler writing (in my opinion). Of all the 8bit CPUs,
>this happens to be my favorite.

One of the biggest advantages of the 6809 to a compiler is the fact that it does
all kinds of stack relative addressing. The 6502 can't even push/pop all of it's
registers let alone perform relative or indirect stack addressing with them...
This ability makes it very easy to deal with C's stack based local variables.

For example, you can access memory on the stack (or through any index register)
with a 0, 5, 8 or 16 bit offset, and you can use an 8 or 16 bit accumulator to
calculate an offset. You can also perform indirect operations using stack based
pointers, all in a single instruction. Plus, all index and stack registers on the
09 are 16 bits. The 6502's 8-bit index registers are somewhat at odds with C's
notion that a pointer can point 'anywhere'. So, on the 6502, you end up using
zero page 16 bit "registers" a lot, and these involve more overhead to manipulate.

The 6809 is also my favorite 8-bitter (perhaps that's why there's 6 CoCo's in my
collecion). The very first edition of my C compiler was targeted to the 6809. At
one point I even designed my own portable 6809 computer (hardware and software),
you can see it (and even try it out with a simulator) at my "old computers" page:

  http://www.parse.com/~ddunfield/museum/index.html

Look for entry called "D6809". In addition to the OS, the system has a "bunch" of
utilities, several editors, an assembler and a simple implementation of APL. there's
even an 8080 emulator which allowed me to easily bring over code from my Altair which
was my main computing platform prior to this one.

It's disappointing that the 6809 never received as much acceptance or use as it should
have. It was truly in a class by itself. Motorola documents show two circles, one
containing the words "8-bit" and one containing the words "16-bit". A third circle,
linking the other two contains the word "M6809", and this is a good description of the
part. It was an 8-bit CPU with a great deal of 16 bit capability.

Btw, I have scanned the "Motorola M6809-M6809E Microprocessor Programming Manual" and
a fair bit of other 6809 reference material, which is all available on my site.

Regards,
-- 
dave04a (at)    Dave Dunfield
dunfield (dot)  Firmware development services & tools: www.dunfield.com
com             Vintage computing equipment collector.
                http://www.parse.com/~ddunfield/museum/index.html
Received on Wed Apr 28 2004 - 06:25:52 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:31 BST