Skip to main content

Computer Technical Support

by Russ Bellew · phone 954 873-4695

Home  Services  About Me  Tips  Truth  FAQ  Viruses  Jargon  My blog  Talk  Contact Me  Search   
My PC History 1 > My PC History 2 > Zilog Z80 > My PC History 3 > My PC History 4 > My PC History 5 > My Faves >  
The Zilog Z-80 CPU that was used in the NorthStar Horizon and many other CP/M computers had some clever features that resulted in faster program execution than its rival, the  Intel 8080 CPU. It also executed all of the Intel 8080's instructions, as well as its own clever instructions. So, the Z80 could replace the 8080, or run faster than the 8080 when executing code that was written especially for it.
 
The Z80's instruction set was a superset of the 8080's instruction set. And what clever instructions they were!
 
One of my favorite Z80 features was that it had two identical sets of registers. The accumulator A had a duplicate, A' (pronounced "A prime"). Register B had a duplicate, called B' (pronounced "B prime"), etcetera. Zilog called them "alternate registers". This meant that when the CPU was interrupted, it didn't need to push register contents unto the computer's stack (a set of relatively slow memory operations) before servicing the interrupt, as did the Intel 8080; it could instead just use its alternate set of registers to service the interrupt (if instructed to). When the CPU returned from servicing the interrupt, if instructed to, it would just swap back to using its original set of registers, whose contents had remained intact while servicing the interrupt. This was clever CPU architecture!
 
The Z80 could also perform block moves of memory contents from one memory address to another in a few clock cycles, while the Intel 8080 needed to execute repeated MOV instructions in a loop.  Again, this was brilliant.
 
In theory, you needed a Z80 specific assembler to make the Z80 dance its special steps.  I couldn't afford that, so I found a way for CP/M's ASM assembler to generate Z80 opcodes. Since an assembler just creates a long string of ones and zeros to instruct the CPU, it really doesn't matter what the source code looks like, as long as the opcodes within the object code are correct.  I forget the exact tactic, but I do recall that it worked for the few special Z80 opcodes that I wanted to use.  I think that I borrowed this idea (again) from an article in Lifelines magazine.
 
I also found a way to simulate most of what a relocating assembler does, by using address offsets within my ASM source code.
 
I really wanted to have a relocating Z80 macro assembler, but couldn't afford one. I found ways to simulate most of the features of the fancy assembers, though. It was probably good training.
 
Zilog had jumped way ahead of Intel with the Z80, but for some reason they didn't follow through until it was too late. We kept reading about Zilog's 16-bit successor CPU, the Z8000, but it took forever for Zilog to bring it to market.  While Zilog hesitated, Intel brought out the 16-bit 8086 and 8088 CPUs.  IBM designed their new PC around the Intel 8088, and the rest is history.