Motorola's processors have always been distinguished by the presence of several very attractive features, while at the same time there are both the presence of some absurd abstraction and poor practicality of architectural solutions. The main attractive feature of all processors under consideration is the second complete and very fast register-accumulator.
The 6800 was the first microprocessor to require a single 5-volt power supply – it was a very useful feature. In addition, the 6800 also introduced support for unmasked interrupts for the first time. However the 6800 because of the oneness of the cumbersome 16-bit index register for an 8-bit architecture turned out to be a product inconvenient for programming and use. It was released in 1974, not much later than the 8080, but it did not become the basis for any known computer system. Interestingly, the 6502 developers, Chuck Peddle and Bill Mensch, called the 6800 not right and too big. However, it and its variants were widely used as microcontrollers. Perhaps here it is worth noting that Intel has been producing processors since 1971, which put Motorola in the position of a catch-up party, for which the 6800 was the very first processor. If you compared the 6800 not with the 8080, but with its predecessor the 8008, then the 6800 would be much preferable. Motorola almost caught up with Intel with 68000/20/30/40. I can also note that in the 70s, Motorola was a significantly larger company than Intel.
Numerous variants of the 6800 were also produced: 6801, 6802, 6803, 6805, ... Most of them are microcontrollers with built-in memory and I/O ports. The 6803 is a simplified 6801, it was used in the Tandy TRS-80 MC-10 computer and in its French clone Matra Alice. These computers were very late (1983) for their class and were comparable to the Commodore VIC-20 (1980) or Sinclair ZX81 (1981). The command system of the 6801/6803 has been significantly improved by 16-bit commands, multiplication, and several others. An unusual unconditional branch instruction (BRN – branch never) has appeared, which actually never takes its branch! Some instructions became a little faster. It is worth noting that the 680x architecture was heavily influenced by the PDP-11 architecture. Some concepts of the PDP-11 were copied rather automatically, such as the useless CLV and SEV instructions.
The 680x range fully supports signed integers, the z80 and 6502 support it worse, and the 8080 has almost no such support at all. However, in 8-bit software such support was needed rarely.
The 6809 was released in 1978, when the 16-bit era began with the 8086, and has a highly developed command system, including multiplying two accumulators to obtain a 16-bit result in 11 clock cycles (for comparison, the 8086 requires 70 clock cycles for such an operation). Two accumulators can in several cases be grouped into one 16-bit, which gives fast 16-bit instructions. The 6809 has three index registers and a record number of addressing methods among 8-bit processors – 12. Some of the addressing methods are unique for 8-bit chips, such as indexing with auto-increment or decrement, addressing relative to the command counter (this allows us to write relocatable instructions – there is no such possibility for the 6502, Z80 or even x86 and 68k) and indexing with an offset. Of particular note is indirect addressing, which could be used with almost all basic addressing methods. You can, for example, write instruction LDD [,X++]
that corresponds to C-code short D, **X; D = **X++;
, or LDA [B,U]
that corresponds to C-code char A, B, **U; A = **(B + U);
. The 6809 has an effective address load command, which is sorely lacking on the PDP-11 and which is often very useful, for example LEAX ,--Y;
corresponds to C-code X = --Y;
. The instructions for working with the stack are very powerful, with one command you can load/unload any set of registers – similar commands appeared later on the 68k and ARM, but they are not available for the x86. Relocatable branches may use both 8-bit and 16-bit offsets – the latter is not even available for the 80286! The 6809 has an interesting opportunity to use two types of interrupts: you can use fast interrupts with automatic partial register saving and interrupts with all registers saving. The 6809 has three inputs for interrupt signals FIRQ (fast maskable, it saves only 2 registers), IRQ (maskable, saves all registers), NMI (non-maskable). It is worth noting in general a very high-quality support for working with interrupts, both with hardware and software. Also, it's sometimes convenient to use fast instructions for reading and setting all flags at once.
However, memory operations require a clock cycle greater than the 6502 or 6800. This and some other factors made an ultra-cheap computer based on the 6803 (MC-10) sometimes faster than more expensive machines based on the 6809! Index registers of the 6809 have remained bulky 16-bit "dinosaurs" in the 8-bit world. Some operations simply shock with their slowness, for example, sending one byte from one accumulator to another takes 6 clock cycles (it is longer than loading from memory!), and the exchange of their contents – 8 clock cycles (compare with the 8080, where 16-bit exchange passes for 4 clock cycles)! Relocatable addressing is slower than non-relocatable, and indirect addressing is very rarely needed. For some reason, two stacks are offered at once, perhaps it was the influence of the dead-end architecture VAX-11 – in an 8-bit architecture with 64 KB of memory looks rather awkward. There are no instructions for comparing registers. And even the existence of an instruction with an interesting name SEX of all problems the 6809 cannot eliminate. In general, the 6809 is still somewhat faster than the 6502 at the same frequency, but it requires the same memory speed. I managed to make a division procedure for the 6809 with 32-bit divisible and 16-bit divider (32/16 = 32,16) for approximately 480 cycles on average, for the 6502 I could not achieve less than 530 clock cycles. The second accumulator is a big advantage, but other 6502 features, in particular, the inverted carry flag, reduce this advantage only to the aforementioned rounded 10%. But multiplication by a 16-bit constant turned out to be slower than a table multiplication for the 6502 with a table of 768 bytes. The 6809 allows you to write quite compact and fast code using the direct page addressing mode, but this mode makes the code a bit tangled. The essence of this addressing is to set the high byte of the data address in a special register and specify only the low byte of the address in the commands. The same system with only a fixed high byte value is used in the 6502, where it is called zero page addressing. The direct page addressing is an exact analogue of the use of the DS segment register in the x86 only not for 64K segments, but for segmenties sized only of 256 bytes. Another artificiality of the 6800 architecture is the use of the order of bytes from major to minor (Big Endian), which slows down 16-bit addition and subtraction operations. The 6809 is not compatible with the 6800 instruction codes: you can only translate sources from the 6800 to the 6809 – this is similar to the case with the 8080 and 8086. In fact, the 680x family is a set of about a dozen families of binary incompatible processors. In this material, only two such families are considered: 6800 (6801, 6803) and 6809 (6309). The rest of the families were used only as controllers, one of the best among which is the 68HC12 chip, which has an excellent code density. The 680x family stands out against the background of processors from other companies with unusual oddities when working with flags. For example, memory write commands (ST) set flags, but register load commands from the stack (PUL) do not. Another example, the CLR zeroing command always zeroes the carry flag. The 6809 became the last universal 8-bit processor from Motorola. In further developments, it was decided to use the 68008 instead.
We can assume that Motorola spent a lot of resources to promote the 6809. This has had a lasting effect at mention of this processor. About the 6809 there are many favorable reviews, notable in some fuzziness, generalizations, and inconsistency. The 6809 was positioned as an 8-bit super-processor for micromainframes. Several similar to Unix operating systems were made for it: OS-9 and UniFlex. It was chosen as the main processor for Apple Macintosh and, as follows from the films about Steve Jobs, only his emotional intervention determined the transition to the more promising 68000. Indeed, the 6809 is a good processor, but in general, only slightly better than its competitors that appeared much earlier: the 6502 (three years earlier) and the z80 (two). One can only guess what would have happened if Motorola had spent at least half of their efforts on the development and promotion of the 6809 on the development of the 6502 instead.
The 6809 has been used in several fairly well-known computer systems. The most famous among them is the American computer Tandy Color or Tandy Coco, as well as their British, or more precisely, Welsh clone Dragon-32/64. It is interesting that on these computers the frequency of the 6809 was clearly artificially lowered and was only 0.89 MHz. The computer markets of the 1980's were notable for a significant non-transparency and Tandy Coco was distributed mainly only in the US. Dragons, once only popular in Britain, gained also some popularity in Spain. In France, the 6809 for some reason became the basis for mass computers of the 80s, the Thomson series, which remained virtually unknown anywhere else. The 6809 was also used as a second processor in at least two systems: in the series Commodore SuperPET 9000 and in an extremely rare TUBE-interface device for BBC Micro computers. This processor was used in other systems less well known to me, in particular, Japanese ones. It has also gained some popularity in the world of gaming consoles. It is worth mentioning one of these consoles, Vectrex, which uses a unique technology – a vector display.
Tandy CoCo 3
All the 680x have interesting undocumented instructions with an fascinating name Halt and Catch Fire (HCF), which are used for testing at the electronics level, for example, with an oscilloscope. Its use causes the processor to hang, from which it is possible to exit only by its reset. These processors also have other undocumented instructions. In the 6800 there are, for example, instructions that are opposite to register immediate loading commands, i.e. instructions for storing a register value to the immediate constant!
Like the 8080, 8085 or z80, it is very difficult to call the 6809 a pure 8-bit processor. It is even more difficult to call the 6309 processor 8-bit. The 6309 was produced by the Japanese company Toshiba as a processor fully compatible with the 6809. I was not able to find the exact year when its production began, but there is some evidence pointing to 1982. This processor could be switched to a new mode, which, while maintaining almost full compatibility with the 6809, provided many more capabilities. These capabilities were hidden in the official documentation but were published in 1988 on Usenet. Two additional accumulators were added, but the instructions with them are much slower than with the first two. Interestingly, the new 16-bit register W, assembled from these new accumulators, turned out to be a real general-purpose register – it can be used as an address register and as a data register. The execution time of most instructions was greatly shortened. A number of commands were added, among which was a really fantastic division for the processors of this class – it was signed division of a 32-bit dividend and a 16-bit divisor (32/16 = 16,16) for 34 cycles, with the divisor being taken from memory. Furthermore, 16-bit multiplication with a 32-bit result for 28 clocks appeared. Also, very useful instructions were added for quick copying blocks of memory with a runtime of 6 + 3n, where n is the number of bytes to be copied: you could copy both with decreasing and with increasing addresses. The same instructions could also be used to quickly fill the memory with a specified byte. When they were executing, interrupts could occur. New bit operations (strange load/store of an individual bit with four-operand instructions and unusual two-operand registerless memory operations), a zero-register, register comparisons, etc., appeared too. Interrupts were then invoked when executing an unknown instruction and when dividing by 0. In a sense, the 6309 was the pinnacle of technological achievements among 8-bit processors or more precisely processors with the addressable memory size of 64 KB. However, some of the new 6309 instructions are practically useless (ASLD, LSRD, ASRD, ADCD, ROLD, ...), they are exactly the same size and execution speed as corresponding sequences of two instructions for the 6809.
The 6309 is electrically fully compatible with the 6809, making it a popular upgrade for the color Tandy or Dragons. There are also special OS versions that use the new features of the 6309.
The 680x clones were produced, in particular, in Japan and Bulgaria, but not in the USSR.
Edited by Jim Tickner and Ralph Kernbach.