The 6809 offered some special commands
which are highly used inside the SQ80:
-
SYNC
This commands stops the CPU, brings the processor bus to high impedance
state and waits for an interrupt.
-
CWAI
The byte follwing to the CWAI command is ANDed to the CC register,
afterwards all registers are pushed to the stack. Then, the CPU is stopped,
processor bus is brought to high impedance. After this the CPU waits for
an interrupt.
-
SWI, SWI2 and SWI3
These commands perform so called soft interrupts. In the SQ80 these
are mapped to the CPU´s reset routine but the SWI mode is stored
in RAM. It is used for debugging / error signalling purposed and produce
the SOFT ERRORs which some of you might have encountered.
|
The Status Register is named Condition
Code Register (CC) here and consists of the following bits:
Bit |
Shortcut |
Function |
7 |
E |
Entire Flag |
6 |
F |
Fast Interrupt |
5 |
H |
Half Carry |
4 |
I |
Interrupt |
3 |
N |
Negative |
2 |
Z |
Zero |
1 |
V |
Overflow |
0 |
C |
Carry |
CC Bits
Unlike the 6502 there are no dedicated set or clear commands for write-accessing
these bits. Instead, the ANDCC and ORCC commands exist which manipulate
the CC in a most boolean way. Three flags have to be explained:
-
Entire Flag
This flag is set by the CPU when all flags have been rescued to stack.
-
Fast Interrupt
The 6809 knows two kinds of interrupts: ordinary and fast ones. Fast
interrupt means that nothing is rescued to stack and the fast interrupt
handler is serviced immediately after having finished processing the operation
during which the fast interrupt happened.
-
Half Carry
Same as carry but for half bytes (nibbles).
|
In the SQ80 not the ordinary 6809
is used but its brother 6809E. It differs from the 6809 in the following
ways:
-
extra TSC input for tristating the processor bus (A, D and control signals)
-
E and Q are inputs
|