Motorola 6800 and close relatives
Motorola's processors have always been distinguished by the presence of several very attractive "zests", while at the same time there are the presence of some absurd abstraction and poor practicality of architectural solutions. The main "zest" of all processors under consideration is the second complete and very fast register-accumulator.
6800 because of the oneness of the cumbersome 16-bit index register for the 8-bit architecture turned out to be the product inconvenient for programming and use. It was released in 1974, not much later than 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, “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. And if you compare the 6800 not with the 8080, but with its predecessor 8008, then the 6800 will be much preferable. Motorola almost caught up with Intel with 68000/20/30/40. We can also note that in the 70s, Motorola was a significantly larger company than Intel.
The 6809 was released in 1978, when the 16-bit era began with 8086, and has a highly developed command system, including multiplying two accumulators to obtain a 16-bit result in 11 clock cycles (for comparison, 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. 6809 has two index registers and a record number of addressing methods among 8-bit processors – 12. Among the addressing methods are unique for 8-bit chips, such as index with auto-increment or decrement, relative to the command counter, index with offset. 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. 6809 has three inputs for interrupt signals FIRQ (fast maskable), IRQ (maskable), NMI (non-maskable). 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 6502. Index registers 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, and the exchange of their contents – 8 clock cycles (compare with 8080, where 16-bit exchange passes for 4 clock cycles)! For some reason, two stack pointers 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 very awkward. And even the existence of an instruction with an interesting name SEX of all problems 6809 cannot eliminate. In general, 6809 is still somewhat faster than 6502 at the same frequency, but it requires the same memory speed. I managed to make a division procedure for 6809 with 32-bit divisible and 16-bit divider (32/16 = 32,16) for just over 520 cycles, for 6502 I could not achieve less than 650 clock cycles. The second accumulator is a big advantage, but other 6502 features, in particular, inverted carry flag, reduce this advantage only to the aforementioned 25%. But multiplication by a 16-bit constant turned out to be slower than a table multiplication for 6502 with a table of 768 bytes. 6809 allows you to write quite compact and fast codes using the direct page addressing mode, but this mode makes the codes a bit tangling. 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 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 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. 6809 is not fully compatible with 6800 instruction codes. 6809 became the last 8-bit processor from Motorola. In further developments, it was decided to use 68008 instead of it.
We can assume that Motorola spent a lot of resources to promote the 6809. This affects so far at the mention of this processor. About 6809 there are many favorable reviews, notable in some fuzziness, generalizations, and inconsistency. 6809 was positioned as an 8-bit super-processor for micromainframe. For it was even made almost Unix, OS-9 and UniFlex. He 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 a more promising 68000. Indeed, 6809 is a good processor, but in general, only slightly better than its competitors appeared much earlier: 6502 (three years earlier) and z80 (two). One can only guess what would have happened if Motorola had spent at least half of its efforts on the development and promotion of the 6809 on the development of the 6502.
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. The computer markets of the 1980s were notable for a significant non-transparency and Tandy Coco was distributed mainly only in the US, and Dragons besides Britain itself gained some popularity in Spain. In France, 6809 for some reason became the basis for mass computers of the 80s, the Thomson series, which remained virtually unknown anywhere else except France. 6809 was also used as a second processor at least in two systems: in the series Commodore SuperPET 9000 and in a produced in very limited number and now almost forgotten TUBE-interface device of 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|
6800 and 6809 have interesting undocumented instructions with the interesting 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 6800 there are, for example, instructions that are symmetrical to register immediate loading, i.e. instructions for immediate storing a register to the address following this instruction!
Like 8080, 8085 or z80, 6809 is very difficult to call a pure 8-bit one. And 6309 is even formally difficult to call 8-bit, it was produced by the Japanese company Toshiba (I was not able to find the exact year of the beginning of its production, but there are some data pointing to 1982) as a processor fully compatible with the 6809. However, this processor could be switched to a new mode, which, while maintaining almost full compatibility with the 6809, provided almost an order of magnitude more opportunities. These features were hidden in the official documentation but were published in 1988 on Usenet. Two more accumulators were added, but the instructions with them are much slower than with the first two. The execution time of most instructions is greatly shortened. A number of commands were added, among which is a really fantastic division for the processors of this class – it is 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. As well 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 can copy both with decreasing and with increasing addresses. The same instructions can also be used to quickly fill the memory with a specified byte. When they are executing, interrupts may occur. New bit operations, a zero-register etc. appeared too. Interrupts are now invoked when executing an unknown instruction and when dividing by 0. In a sense, 6309 is the pinnacle of technological achievements among 8-bit processors or more precisely processors with the addressable memory size of 64 KB.
The 6309 is electrically fully compatible with the 6809, making it a popular upgrade for color Tandy or Dragons. There are also special OS versions that use the new features of 6309.