Welcome to the Chip Letter. This week’s short ‘Chiplet’ post is on Morris Chang, TSMC and Japan. It’s available for premium subscribers now and will be unlocked for everyone next week.
Next week’s full post, Demystifying GPU Compute Software, a companion to Demystifying GPU Compute Architectures, will look at the story of the software ecosystems for programming GPUs.
Today, the last post in our series on 8-bit designs, with a look at possibly the most advanced design of the 8-bit era, the Motorola 6809.
“This is a story. It is a story of computers in general, specifically microcomputers, and of one particular microprocessor - with revolutionary social change lurking in the background. The story could well be imaginary, but it happens to be true.”
Byte Magazine on the Motorola 6809.
This is our third and final post on Motorola’s 6800 8-bit microprocessor series. In the first part, we saw how a small but talented team based in Phoenix Arizona developed the 6800 itself. In the second, Motorola’s management tried to force that team to move to Austin, Texas. The majority of the team left Motorola and some, including Chuck Peddle and Bill Mensch, joined MOS Technology in Pennsylvania, where they created the 6502.
The 6800 would lose decisively to the 6502 in the competition to become one of the leading designs powering the home computer boom of the late 1970s. The cheaper and more capable 6502 was used in the Apple II, Commodore’s PET and 64, the BBC Micro, and many other popular designs.
But this wasn’t the end for the 6800 series. Motorola had the resources to rebuild its team in Austin, and the clout to attract big customers, including General Motors who turned to Motorola and the 6800 for the microprocessor for their new engine control system.
General Motors was shifting maybe 6,000,000 vehicles a year at the time: 500,000 vehicles a month. This was a system that used maybe four chips per system. It was a big business.1
And with the GM deal the 6800 suddenly became a very big business indeed.
... Motorola microprocessors went from sales of zero to sales of about $250,000,000 almost overnight, maybe a year to 18 months or something. And it was at a good margin.
With a big customer and a successful and profitable business, the evolution of the 6800 series continued. The Motorola Microprocessors Data Manual2 from 1989 has a summary of all the variants of the design that were available at that time.
And Retro StackExchange has a great description of these key variants.
6800: "[A]nnounced in March 1974 and was in full production by the end of that year." "The M6800 microcomputer system was finally in production by November 1974.".
68A00, 68B00: "The new parts were available in July 1976.".
6802, 6808: Added onboard clock and (6802 only) 128 bytes of RAM. Announced by March 3rd 1977.
6801, 6803: Adds 16-bit "D" register as a concatenation of A and B and various new instructions, including multiply. This or a very similar MCU appears to have been in use by General Motors as early as 1977;
6809: The earliest mention I can find that includes a month is in an Elsevier journal. This seems unlikely to be the initial announcement, but is probably well before production. (6809s were not on sale in the back pages of Byte in December 1977.)
6805: Optimized for controller applications; incompatible architectural changes such as X register reduced to 8 bits. It may have existed internally at Motorola as early as 1977 or 1978: "this is '77-'78 timeframe -- they came and said, 'Hey, we'd like to have a CMOS version of this 6805 variant.". (The M14605 is the CMOS 6805. It and several 6805 variants have data sheets in claims release in 1979. archive.org has an M6805 M14605 Family Users Manual dated 1980.
68HC05: "A low-power variation of the 05," "shipped..in December of 1979."
In case you're wondering about the "holes" in this numbering scheme: The 6804 was a reduced-cost modification of the 6805 released around 1982. The 6806 and 6807 designations were never used, as far as I can tell. The 6810 was a RAM chip. The 6811 was a 6801 extension introduced in 1984. The 6812 in turn extended that, but not until the 1990s. From the beginning parts from 6820 onwards were peripherals.
Generally, these were minor variants on the original 6800, with tweaks to the instruction set, some additional RAM, or built with a more advanced fabrication process.
One of these new designs was much more ambitious than the others, though. That was the 6809.
Origins of the 6809
By 1977 Motorola saw key competitors working on more advanced 16-bit designs. Intel would introduce the 8086 in 1978 and Zilog was working on the Z8000. So the team in Austin started work on an advanced 16-bit design that would compete with the new designs from Intel and Zilog.
…my own perception at the time was that we were going to replace the minicomputer, if you will. It was going to be very high-end, maybe a part that would sell for several hundred dollars, two or three hundred dollars, but it would be of great value to our customers, and have very high margins, and bring in lots of other kinds of parts.3
That design would become the 16/32 bit Motorola 68000 which would eventually become the leading alternative to Intel’s 8086.
The complexity and cost of this design left Motorola with a gap though. Many customers wouldn’t pay for a CPU as advanced as the 68000. By now Motorola had a wide range of variants on the 6800 design. But these variants couldn’t solve the problem that the 6800 architecture was weaker than its leading 8-bit competitors like the 6502 and Z80. So, to better compete with these designs Motorola created a new 8-bit architecture, the 6809.
6809 Architecture
The 6809 was designed to be ‘source code’ compatible with the 6800. Programs written in 6800 assembly language could be assembled and run on the 6809. However, the machine code created for the 6800 would not run on the 6809, as the meaning of many 6800 ‘opcodes’ was changed.
Before we get to the instruction set, a word on the implementation of the 6809. The much more complex 68000 would make heavy use of ‘micro-code’. The simpler 6809, however, could make use of broadly the same design approach that had been used for the 6800. A ‘Programmable Logic Array’ or ‘PLA” would control much of the operation of the 6809. We can place the 6800 and 6809 side by side and see the similarities in the layout, with the PLA at the top, logic in the middle, and the registers and ‘arithmetic and logic unit’ at the bottom.
How did the 6809 team decide what features to add to the architecture? Much like John Cocke with the pioneering RISC architecture, the IBM 801, they set out to analyze existing 6800 programs. Their conclusions?
By far the most common instructions were the loads and stores, which accounted for over 38 percent of all 6800 instructions. Next were the subroutine calls and returns with 13 percent, conditional branches with 11 percent and unconditional jumps and branches with 6.5 percent … Neither the arithmetic nor' logical instructions had as high a usage as might have been expected. Clearly then, enhancements that would improve the utility and power of the data movements (such as load and stores) would yield the largest return on investment, followed by improvements to subroutine linkage and parameter passing.
It’s worth noting, though, that their analysis was limited to a ‘static’ inspection of the number of operations in 6800 machine code, not a ‘dynamic’ analysis of which instructions were being executed most often, for example, because they were being repeated within loops. It’s arguable that some of these results - the large proportion of subroutine calls, for example, might have been quite different if the team had been able to use dynamic analysis.
Other conclusions from the analysis included:
…the offsets for indexed instructions showed that 93 percent of the offsets were either 0 or less than 32
And a majority were not zero.
So the 6809 added some instructions that could add an integer to a 16-bit index register. From Rodnay Zak’s ‘Programming the 6809:
Other new features included:
Direct Page Register
One of the things that had made the 6502 so successful, was its extensive use of ‘zero page’, or memory locations 0 to 255. With a very limited number of registers, the 6502 relied on the use of ‘zero page’ to access frequently used values. Access to these values was faster as only a single address byte was needed to specify the address. The 6809 enhanced the use of the zero page by adding a new 8-bit ‘Direct Page’ register which allowed the ‘zero page’ to be moved to anywhere in the 16-bit address space.
‘U’ Stack Pointer
The 6809 added a ‘User’ Stack Pointer’ register - called ‘U’ - as an addition to the existing ‘S’ Stack Pointer’.
Branch Relative Addressing
In the 6800 (and the Z80 and 6502) there were ‘branch’ instructions with the program counter jumping to an address close by with the address determined by a single byte ‘offset’. To jump to an address outside this range, it was necessary to specify a two-byte ‘absolute address’ for the target code. This meant that code typically could not be ‘position independent’, it had to be written to be stored at a predetermined set of locations in memory.
The 6809 changed this by adding the ability to branch to addresses within the full 64K memory range, by specifying a two-byte value that would be added to the program counter. This meant that compiled or assembled code could potentially be ‘position independent’ and loaded and run at any address in memory.
D Register
The ‘16-bit accumulator D’ was Motorola’s designation of the combination of the A (most significant byte) and B (least significant byte) accumulators. The D register could be loaded with a single instruction.
Multiply Instruction
Finally, and in a first for an 8-bit processor, the 6809 added an (8-bit) multiply instruction.
A multiply instruction is included which multiplies unsigned binary numbers in accumulators A and B and places the unsigned result in the 16-bit accumulator D. This unsigned multiply instruction also allows signed or unsigned multiple-precision multiplication.
Launch in Byte January 1979
By the start of 1979, Motorola was ready to launch the 6809 to the world and it did so in style, with a three-part article in Byte magazine. The series started with text that would probably have seemed a little overwrought, even at the time.
This is a story. It is a story of computers in general, specifically microcomputers, and of one particular microprocessor - with revolutionary social change lurking in the background. The story could well be imaginary, but it happens to be true.”
By the start of 1979, the first 16-bit microprocessors were either available or widely known to be on their way. The 6809 was interesting but hardly revolutionary. Fortunately, the rest of the series of articles was more focused on providing readers with interesting insights into the development of the 6809.
It highlighted the contributions of the two leads of the 6809 project, Joel Boney and Terry Ritter” both working in Austin:
Joel Boney and Terry Ritter are with the Motorola 6800 Micro-processor Design Group in Austin TX. joel is responsible for the software input into the design of the 6800 family processors and peripheral parts and was a co-architect of the M6809. Terry Ritter is a microcomponent architect, responsible for specification of the 6809 advanced microprocessor.
The task of designing the 6809 is broken down into several separate stages:
The design of a complex large-scale integration (LSI) part may be conveniently broken into three phases: the architectural design, the logic and circuit design/architectural review, and the layout software and hardware (breadboard) simulations. Each phase has its own requirements.
Logic design consists of the production of a cycle-by-cycle flowchart and the derivation of the equations and logic circuitry necessary to implement the specified design.
Layout is the actual task of arranging transistors and interconnections to implement the logic diagram. Circuit design results will indicate appropriate transistor sizes and polysilicon widths; these must now be arranged for minimum area. Every attempt is made to make general logic "cells" which can be used in many places across the integrated circuit, but area minimization is the principal concern.
The layout for the chip eventually exists only as a computer database. Each cell is individually digitized into the computer, where it can be arbitrarily positioned, modified or replicated as desired.
A full copy of the Byte article is available for premium subscribers to download at the end of this post, along with links all parts of the Byte series on the 6809.
Performance
How did the 6809 compare to the competition? Rodnay Zaks ‘Programming the 6809’ book (see link at the end of this post) said:
When you have mastered the material in this book, you will understand how 6809 systems, when properly designed and programmed, can deliver near 16-bit performance with 8-bit economy
Quite a claim! Does it stack up? We looked at the performance of a range of contemporary systems in ‘Once More through the Sieve’.
That post looked at a Byte article that performs a simple test of the performance of a range of system in 1983.
So how does the 6809 compare?
An assembly language version of the test running on the 6809 takes 5.1 seconds compared to 6.8 on a Z80 and 13.9 on a 6502 (clock speeds unspecified in each case). Comparing with the first 16-bit processors, a 5MHz 8088 takes 4.1 seconds, an 8MHz 8086 2.9 seconds, but Motorola’s own 68000 running at 8MHz is much faster at just 0.49 seconds.
So the 6809 was competitive with Intel’s 8088 but completely outclassed by Motorola’s own 68000.
6809 Computers
The 6809 was launched with a bang and had performance approaching Intel’s first 16-bit designs. Would it be enough for it to make an impact? It certainly attracted interest early on, including at Apple in the team that was designing the Macintosh. According to folklore.org
“The first Macintosh digital board, designed in late 1979, was based on Jef Raskin's specifications: it had a Motorola 6809E microprocessor, 64K of memory, and a 256x256 black and white, bit-mapped graphics display.
The first Macintosh was a cute little computer, but it was fundamentally limited by the 6809 microprocessor, which only had 16 bits of address space.
But Apple was already working on the Lisa which had adopted the 68000 and reusing some of the Lisa’s optimized 68000 assembly source code in the Macintosh was an attractive option, so the 6809 was quickly dropped in favor of its larger cousin.
Perhaps the most well-known use of the 6809 in a production computer was in the Tandy Color Computer. The design had a surprising origin story: as a terminal for farmers in Kentucky in a project known as ‘Green Thumb’. Quoting from the document4 produced for US Congress.
Green Thumb, the experimental videotext project tested by the Kentucky Cooperative Extension Service and the University of Kentucky College of Agriculture, was conceived in 1977 as means of providing farmers with real-time weather, marketing and agricultural information. As a result of efforts by Senator Walter Ruddiest (D-Ky.), the Department of Agriculture provided $200,000 and the National Weather Service $100,000 for a pilot project involving two counties in Kentucky. After technical committee determined hardware specifications, bids for the equipment were taken. Motorola won the contract for the user terminals or "Green Thumb Boxes", while Western Union provided the two county host computers; the Computer Division of Tandy Corporation later joined with Motorola in manufacturing user terminals. Two hundred farmers from Todd and Shelby Counties were chosen for the experiment which began operation in March 1980.
This design was adapted to create a computer that Tandy could sell to home users. Although it was called the Tandy TRS-80 Color, it had almost nothing in common with its predecessor TRS-80 models, which used the Z80 processor.
Motorola supplied all the key components of the Tandy Color and also made a reference computer design available to third parties. It was relatively easy for other companies to use that reference design to build their version of that design. One firm that did so was based thousands of miles away from Austin, in Wales in the UK. The Welsh flag has a dragon so it was named Dragon Data and it launched with a home computer based on Motorola’s 6809 reference design, the Dragon 32.
The Dragon 32 was followed by the Dragon 64 with 64KB of RAM. As the home computer market contracted in the early 1980s, Dragon Data soon got into financial difficulties and was sold to a Spanish startup which in turn failed a couple of years later.
OS-9
With a more sophisticated and ambitious 8-bit processor, it made sense for Motorola to invest in software that could make the most of the capabilities of the new design. So they commissioned Microware to develop both a BASIC interpreter and an operating system for the 68095.
The first version ("OS-9 Level One"), which dates back to 1979–1980, was written in assembly language for the Motorola 6809 CPU, and all of its processes ran within the 64KB address space of the CPU without a memory management unit. It was developed as a supporting operating system for the BASIC09 project, contracted for by Motorola as part of the 6809 development.
OS-9 would continue to be developed and ported, first to the 68000 and then to a wide range of other processor architectures including PowerPC, Arm, and Intel’s x86, and is still in use in embedded applications today.
Video Games
The 6809 also made it into several arcade video games, including the popular ‘Defender’.
The best 8-bit? Maybe, but still an 8-bit design with no future
The 6809’s architecture was an improvement over its predecessors but it was still an architectural dead end. The future lay with the 8086, 68000, and their successors.
Contrary to the hyperbole of the Byte article, the 6809 wasn’t revolutionary, it was evolutionary. And as an 8-bit design it had some clear limitations.
The 6809’s designers hadn’t tried to address perhaps the most significant limitation of competing 8-bit designs, the fact that they were limited to 64KB of memory. By the early 1980s, even cheap home computers were using the whole of the 64K address space. There was an option to expand the 6809’s memory to up to 2 MB using an external Memory Management Unit, the 6829. According to the 6829’s manual6 the chip:
• Expands Memory Address Space from 64K to 2 Megabytes
• Provides Task Isolation and Write Protection
• Provides Efficient Memory Allocation; 1024 Pages of 2K Bytes Each
Bu perhaps the biggest factor that limited adoption of the 6809 was Motorola’s own 68000, also launched in 1979. The ambition of the 16/32-bit 68000 meant that it had nothing in common with the 6800 or 6809 and so there was no sensible upgrade path from the 6809 to the 68000. The 6809’s architecture was an improvement over its predecessors but it was still an architectural dead end. The future lay with the 8086, 68000, and their successors.
After the paywall, the full Byte article from January 1979 and links to further reading on the 6809 and the TRS-80 Color and Dragon 32.