goliath32.com - The Zilog Z80 has turned 50
The Zilog Z80 has turned 50
Back to the Blog Index
Introduction
As of writing, the Zilog Z80 processor was officially launched 50 years<br>ago, in July of 1976, less than 4 years after the last human had walked<br>on the moon, decades closer to WWII than to the present day,<br>roughly at a half way point between the Kennedy assassination and the<br>fall of the Berlin wall, closer to the Korean war than to 9/11 which is<br>itself an event that happened a quarter of a century ago. (Sorry…)
The processor was extremely successful, being used in many 8 bit<br>microcomputers, including early personal computers, home & hobby<br>computers, as well as many embedded, industrial applications.
Together with the 8080 & 8085 that it is binary compatible with, it<br>contributed to creating a de facto hardware standard for 8 bit micros,<br>allowing a de facto software standard of CP/M, and Microsoft BASIC.
The Z80 itself also spawned many clones and derived architectures over<br>the years, famously including the Sharp LR35902, used in the original<br>GameBoy. Zilog themselves eventually gave up their line of 16 and 32 bit<br>derived architectures and returned to Z80 based microcontrollers and<br>variants like the pipelined and higher clocked<br>eZ80, mainly<br>for continued use in industrial applications.
I myself am much too young to have seen the home computing side of this<br>(ignoring the aforementioned GameBoy), but the widespread use in<br>industrial applications means that the original Z80 is still around and<br>in use with Zilog finally discontinuing it mere 2 years ago.
My own first encounter with the Z80 was as a late teenager, when I was<br>browsing an electronics company catalog, surprised to find them still<br>being sold. I designed my own little Z80 computer and convinced a school<br>teacher to let me use the photo lab at night, so I could etch some PCBs.
As several of my former teachers got curious what I was up to, I ended up<br>hearing a lot of interesting anecdotes about old home computers,<br>consoles and a story about DIY wire wrap computer in a Tupperware box,<br>running CP/M and WordStar, hooked up to a "borrowed" IBM terminal that<br>was used to write a thesis on. Over time I ended up being gifted a number<br>of old chips from dusty drawers that made it into my own DIY project,<br>including a bunch of MCS-85 parts, several Z80s, 8085s, 6502s and 6522s.
The whole thing sure taught me a number of interesting lessons about<br>systems engineering and some unexpected ones (reliable power-on reset is<br>surprisingly hard; writing a linker is a lot harder than writing an<br>assembler, writing a compiler is something you can actually do).
Anyway, that is my claim to being allowed to reminisce about the Z80.<br>While I originally wanted to limit myself to some technical details<br>based on my own experience, comparing the Z80 with the 8080 that it<br>was derived from, I ended up diving down a rabbit hole of the<br>Computer History Museums oral history panel, where the people<br>involved recalled even more anecdotes about the development of those<br>chips. The whole "I'll try to write a blog post (again)" idea quickly<br>ballooned in scope.
From the 2200 to the 8008
Once upon a time, the
Computer Terminal Corporation (CTC)<br>built a new, programmable terminal, the<br>Datapoint<br>2200, sporting an 8 bit processor constructed from individual TTL<br>chips. Intel was supplying CTC with shift registers and memory chips<br>at the time.
The idea was floated to replace parts of TTL cemetery with custom ICs,<br>eventually it was considered to try and get the entire 8 bit CPU on a<br>single chip. Two different companies were ultimately contracted for<br>this task: Texas Instruments and Intel.
Neither company finished their design in time. When Intel had the chip<br>ready, originally named 1201 based on a systematic naming<br>convention, CTC were already selling terminals based on the TTL design.
Engineers at CTC were also unsatisfied with the performance of the chips<br>and they had already made changes to the architecture for the next<br>generation of the terminal anyway.
While TI ultimately canned their design, Intel went ahead and successfully<br>commercialized their version as the 8008 (like the 4004 ,<br>renamed by marketing).
The 8008 Architecture
-9V ---|1 |_| 18||2 17||3 16||4 15||5 14|-> SYNC __<br>AD3 |6 13|-> S0 |<br>AD2 |7 12|-> S1 > State<br>AD1 |8 11|-> S2 __|<br>AD0 |9 10|-- +5V<br>|_________|
PC
The 8008 has 7 registers: A , B , C , D ,<br>E , H , L . Where A is the designated<br>accumulator, the others can be used as operands or scratch. As the name<br>might imply, H and L together form the H igh and<br>L ow part of a memory pointer. Accessing memory is done through<br>an 8th pseudo register M , representing the memory byte that<br>HL points to.
The processor internally keeps track of ALU state<br>(C ary, P arity, Z ero, S ign) in a<br>few flag bits on which it can perform conditional jumps (including call and<br>return).
The program counter PC is pretty much never visible directly. There<br>are dedicated function call &...