[Coco] 6809 CPU architecture

Robert Gault robert.gault at worldnet.att.net
Tue Jan 20 00:34:53 EST 2004


6809 Registers

bit #	15                                    0
         ---------------------------------------
                   X - Index Register
         ---------------------------------------
                   Y - Index Register
         ---------------------------------------
                 U - User Stack Pointer
         ---------------------------------------
               S - Hardware Stack Pointer
         ---------------------------------------
                  PC - Program Counter
         --------------------|------------------
            A - Accumulator  | B - Accumulator
         ---------------------------------------
         \___________________D_________________/

                             -------------------
                              DP - Direct Page      MSB of 16 bit address
                             -------------------
                              E|F|H|I|N|Z|V|C        CC - Condition Code
                             -------------------

E = Entire Flag
F = Fast Interrupt Mask
H = Half Carry
I = Interrupt Mask
N = Negative Flag
Z = Zero Flag
V = Overflow Flag
C = Carry Flag

Registers are multi-purpose. Math usually is done with the A, B, or, A+B 
ie. D registers but also can done with the X & Y index registers. Stack 
registers can be used for storage or transfers as well as the usual stack.

A stack is just like a pile of plates where each plate is a byte of 
memory. The bottom of the pile is high memory, the top low for the 6809 
systems. Typical usage is first in, last out, meaning that with stack 
operations the top of the pile is what is accessible; ie. push/pull 
operations.

To do anything with a computer requires a transfer of information 
through these or similar registers. The flow of information can be 
to/from hardware or memory.

In addition to data transfers, the 6809 is capable of very simple math; 
addition, subtraction, 8 bit multiplication. It can also make simple 
comparisons; =, <>, >, <, >=, and <=.

At the bit level, it is possible to rotate the A & B registers so that 
they act like conveyor belts where data moves either low to high or high 
to low within the register.

While it may not seem possible to accomplish much with such simple 
operations, they are the basis for everything the Coco can do which is 
quite allot.




More information about the Coco mailing list