back to buchty.net
Section Ensoniq
back to Ensoniq heaven

 
The 6809 microprocessor
Trying to reach me?
Ensoniq - like many others - decided to use the 6809 as the heart of her 80´s machines. When being introduced the 6809 was seen as some kind of 6502-superset, because it was (nearly) source code (not binary!) compatible to the 6502 and offered many more features such as a second accumulator (B), the 16 bit accumulator D and the index registers X and Y have also been extended to 16 bit. Stack access was not hardcoded to page 1 but freely movable within the 16 bit address room. Also, the so called "User Stack Pointer" U was introduced - but since the 6809 did not separate between user and kernel mode the U register is just another 16 bit register like X and Y. Sad but true... These days one really calls for spam when publishing an email address on a website. But what the heck.

rainer@buchty.net

If you expect an answer please send plain text emails. HTML-formatted mails will be dumped automatically.


 
Specialties Status Register 6809 vs. 6809E
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

  •  

 
Instruction set & Data Sheet
Interested in this masterpiece of ancient processor design? Don´t get too used to it, cause Motorola stopped manufacturing the 6809 entirely and even Hitachi dropped their improved version of the 6809 called 6309. But if you own a 6809 based system and want to program it, here´s the instruction set for download:

6809 instruction set
6809 data sheet