|The 6809 offered some special commands
which are highly used inside the SQ80:
This commands stops the CPU, brings the processor bus to high impedance
state and waits for an interrupt.
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
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:
|| Entire Flag
|| Fast Interrupt
|| Half Carry
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:
This flag is set by the CPU when all flags have been rescued to stack.
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.
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
extra TSC input for tristating the processor bus (A, D and control signals)
E and Q are inputs