Zilog z80 processor: The Z80 Microprocessor

The Z80 Microprocessor

   

Navigation
Home
email

Background
History of CP/M
Architecture of CP/M

Using CP/M
Commands and the CCP
Programming with BDOS
The BIOS interface

The Z80 CPU
Architecture of the Z80
The Z80 instruction set

Software Tools
Installing an Emulator
Zip, ark, crunch, and urgh
Editors, Assemblers, Debuggers

Installing CP/M
Assembling a BIOS
Replacing the BDOS
Replacing the CCP

Reference
Memory Map
Data Structures
Glossary

 

History

In 1969 Intel were approached by a Japanese company called Busicom to produce chips for Busicom’s electronic desktop calculator. Intel suggested that the calculator should be built around a single-chip generalized computing engine and thus was born the first microprocessor — the 4004. Although it was based on ideas from much larger mainframe and mini-computers the 4004 was cut down to fit onto a 16-pin chip, the largest that was available at the time, so that its data bus and address bus were each only 4-bits wide.

Intel went on to improve the design and produced the 4040 (an improved 4-bit design) the 8008 (the first 8-bit microprocessor) and then in 1974 the 8080. This last one turned out to be a very useful and popular design and was used in the first home computer, the Altair 8800, and CP/M.

In 1975 Federico Faggin who had had worked at Intel on the 4004 and its successors left the company and joined forces with Masatoshi Shima to form Zilog. At their new company Faggin and Shima designed a microprocessor that was compatible with Intel’s 8080 (it ran all 78 instructions of the 8080 in exactly the same way that Intel’s chip did) but had many more abilities (an extra 120 instructions, many more registers, simplified connection to hardware). Thus was born the mighty Z80!

The original Z80 was first released in July 1976. Since then newer versions have appeared with exactly the same architecture but running at higher speeds. The original Z80 ran with a clock rate of 2.5 MHz, the Z80A runs at 4MHz, the Z80B at 6MHz, and the Z80H at 8mhz.

Many companies produced machines based around Zilog’s improved chip during the 1970’s and 80’s and because the chip could run 8080 code without needing any changes to the code the perfect choice of operating system was CP/M.

So, let’s dive into the Z80 and see what’s inside…

8-bit data, 16-bit addresses

The Z80 uses 8-bit bytes which are stored in memory. These bytes contain both the program that the processor is executing and the data items that the program is working on. The processor uses 16-bit addresses to access these bytes, so there can be anything up to 64k (65536) bytes of memory. How much memory is actually available, and how much of it is read only (ROM) or random access (RAM) varies from one machine to another: in a simple controller there might be just 4k of ROM holding the program and 1k of RAM for the data items; in a large CP/M system you would find a full 64k of RAM.

The processor also uses a separate 64k of addresses for input and output devices. This I/O address space is only used by a few instructions (called, not surprisingly, IN and OUT) to send or receive bytes from I/O devices. The addresses for I/O instructions use the same wiring as the addresses for memory and the data bytes travel through the same wiring that is used for bytes in memory so the processor uses special control signals to differentiate between memory accesses and I/O operations. These control signals have to be decoded by I/O devices together with the addresses sent by the processor so that devices do not mistakenly respond to requests that were intended to read or write bytes in memory.

Programmer’s Model

All programming of the Z80 revolves around its internal registers. These registers are used to control the flow of the program and to operate on data items. There are 16-bit registers inside the processor that address the program bytes in memory and there are 8-bit registers into which data bytes are loaded and then operated on. These 8-bit registers can also be combined in pairs to form 16-bit addresses and these addresses can be used to index data structures in memory that span several bytes.

Flow of Control Registers

The Z80 uses a 16-bit program counter (PC) to hold the memory address of the next instruction to execute. This register gradually steps through memory as instructions are executed, but some instructions can alter it directly to cause the flow of the program to branch to a new location.

The Z80 also supports subroutines calls with a stack pointer (SP). When a subroutine is called the contents of PC are pushed into the memory location pointed to by SP and the stack pointer is decremented. When the subroutine has finished executing the stack pointer is incremented and the contents of PC popped back from the memory location. In this way calls to subroutines can be nested to any depth, as long as there is space to push the program counter into memory for each call.

The Z80 also contains flags to control the flow of a program. The flags are changed whenever an arithmetic operation is done and the flags can be tested one at a time by a jump instructions to change the flow of the program, depending on the state of the flag. The flags record the sign (S), zero (Z), half-carry (H), parity (P), and carry (C) of the result of the last arithmetic instruction and all of these can be tested by jump instructions. There is also a flag that records whether the last arithmetic operation was an addition or subtraction (N) which is only used to decimal arithmetic. These six flags are stored in a single byte (F) with bits 3 and 5 left unused.

8-bit Data Registers

The Z80 processor contains 14 general purpose registers which can be used for holding and manipulating data bytes. Each of these registers is 8-bits wide and they are named A, B, C, D, E, H, L, A’, B’, C’, D’, E’, H’, L’.

As their names suggest the registers are divided into two sets. The first set are the registers A..L and the second set, called the alternate registers, are A’..L’. Most operations in the processor only work on the first set and the alternates just provide temporary space to save the contents of A..L. The Z80 has short instructions that exchange the contents of the working registers with the contents of the alternates. Of course, this temporary space could easily be allocated in memory but in applications where timing is critical it is much quicker to exchange the working registers and the alternates rather than having to save the working registers and then load new values from memory.

Once data has been loaded into the working registers the Z80 has a full range of arithmetic, logical, shifting, and rotating instructions to handle 8-bit bytes. The results of these operations generally end up in register A (the accumulator) from where they can be moved to other registers or saved back to memory locations.

In a few instructions the flags are treated as a single byte that is called the F register.

16-bit Address Registers

The Z80 contains two types of 16-bit addressing registers: register pairs and index registers.

Register pairs are formed from combinations of the 8-bit general purpose registers. The Z80 allows three combinations: registers B and C can be combined to form a 16-bit register that is called BC, registers D and E combined to form DE, and H and L combined to form HL.

These register pairs can be used to do some limited 16-bit arithmetic (addition, subtraction, increment, decrement) but generally they are used as pointers to data in memory. The instruction set is heavily biased towards using HL as a data pointer. Many arithmetic instructions can combine the accumulator A with the byte in memory that is pointed to by HL. In this way the byte in memory does not have to be loaded into a internal register before it is combined with the accumulator, saving instructions and register space.

The processor also contains two index registers (IX and IY) that can be used to address data in memory. These registers work very like the HL register pair in that many instructions can use a byte that is addressed by IX or IY as an operand. However, unlike HL, an offset is added to the value in the index register before addressing memory. This offset is contained in the instruction that is using IX or IY and it is an 8-bit value. This helps the programmer create fancy data structures in memory using an index register to point to the start of the structure and the 8-bit offset to select fields within the structure.

Hardware Registers

The Z80 also contains a few registers that let the user control its hardware in some simple ways.

Interrupts can be controlled with two flags (IFF.1 and IFF.2) and an 8-bit page pointer (I). The programmer can enable and disable some interrupts by setting and clearing IFF.1. When an interrupt does happen the current contents of IFF.1 are saved in IFF.2 and then IFF.1 is set so that further interrupts are disabled. When the program has finished handling the interrupt IFF.2 is copied back to IFF.1, restoring the flag to its original value.

Instruction Set

These links will take you to tables that describe the Z80 instructions in detail. They are broken down into groups of similar instructions:

8-bit Load and Store — Using the general purpose registers
16-bit Load and Store — Using register pairs, index registers, and the stack pointer

1-bit Arithmetic — Set a bit, Clear a bit, Test a bit

8-bit Arithmetic — Add, Subtract, And, Or, etc.
8-bit Shift and Rotate — Shift left, Shift right, Rotate, Insert carry bit, etc.

16-bit Arithmetic — Add, Subtract, Increment, Decrement

Flag Control — Set carry flag, Clear carry, Enable and Disable interrupts
Program Flow — Jump, Conditional jump, Call subroutine

I/O — Input a byte, Output a byte
Block Instructions — Move block of memory, Search a block of memory, Input or Output a block

3-Aug-98 22:38:42

Chip Hall of Fame: Zilog Z80 Microprocessor

The rays of the rising sun have barely reached the foothills of Silicon Valley, but Marcian E. (Ted) Hoff Jr. is already up to his elbows in electronic parts, digging through stacks of dusty circuit boards. This is the monthly flea market at Foothill College, and he rarely misses it.

Ted Hoff is part of electronics industry legend. While a research manager at Intel Corp., then based in Mountain View, he realized that silicon technology had advanced to the point that, with careful engineering, a complete central processor could fit on a chip. Teaming up with Stanley Mazor and Federico Faggin, he created the first commercial microprocessor, the Intel 4004.

This article was first published as “Marcian E Hoff.” It appeared in the February 1994 issue of IEEE Spectrum. A PDF version is available on IEEE Xplore. The photographs appeared in the original print version.

But for Hoff, the microprocessor was merely one blip among many along the tracing of his long fascination with electronics. His passion for the field led him from New York City’s used electronics stores to elite university laboratories, through the intense early years of the microprocessor revolution and the tumult of the video game industry, and ultimately to his job today: high-tech private eye.

Fairly early in his childhood Hoff figured out that the best way to feel less like a kid—and a little more powerful—was to understand how things work. He started his explorations with chemistry. By the age of 12 he had moved on to electronics, building things with parts ordered from an Allied Radio Catalog, a shortwave radio kit, and surplus relays and motors salvaged from the garbage at his father’s employer, General Railway Signal Co., in Rochester, NY. Then in high school, working mostly with second­hand components, he built an oscilloscope, an achievement he parlayed into a technician’s job at General Railway Signal.

Hoff returned to that job during breaks from his undergraduate studies at Rensselaer Polytechnic Institute, Troy, N.Y. Several summers began with Hoff entering the General Railway laboratory to find the researchers’ two best oscilloscopes broken. He would repair the state-of-the-art Tektronix 545s, then move on to more interesting stuff, like inventing an audio frequency railroad­train tracking circuit and a lightning protection unit that gave him two patents before he was out of his teens.

The best thing about the job, Hoff recalled, was the access it gave him to components that were beyond the budgets of most engineering students in the l950s—transistors, for instance, and even the just-introduced power transistor. He did an undergraduate thesis on transistors used as switches, and the cash prize he won for it quickly went for a Heathkit scope of his own.

Early Neural Networks

Hoff liked the engineering courses at Rensselaer, but not the narrow focus of the college itself. He wanted to broaden his perspective, both intellectually and geographically (he had never been more than a few miles west of Niagara Falls), so chose California’s Stanford University for graduate school. While working toward his Ph.D. there, he did research in adaptive systems (which today are called neural networks) and, with his thesis advisor Bernard Widrow, racked up two more patents.

“He had a toy train moving back and forth under computer control, balancing a broom­ stick. I saw him as a kooky inventor, a mad scientist.”
—Stanley Mazor

His Intel colleague Mazor, now training manager at Synopsys Inc., Mountain View, Calif., recalled meeting Hoff in his Stanford laboratory.

“He had a toy train moving back and forth under computer control, balancing a broomstick,” Mazor said. “I saw him as a kooky inventor, a mad scientist.”

After getting his degree, Hoff stayed at Stanford for six more years as a postdoctoral researcher, continuing the work on neural networks. At first, his group made the networks trainable by using a device whose resistance changed with the amount and direction of current applied. It consisted of a pencil lead and a piece of copper wire sitting in a copper sulfate and sulfuric acid solution, and they called it a memistor.

“One result of all our work on microprocessors that has always pleased me is that we got computers away from those [computer center] people.”
—Ted Hoff

The group soon acquired an IBM 1620 computer, and Hoff had his first experience in programming—and in bucking the system. He had to deal with officials at the campus computer center who thought all computers should be in one place, run by specialists who handled the boxes of punched cards delivered by researchers. The idea that a researcher should program computer systems interactively was anathema to them.

Ted Hoff: Vital Stats

Name

Marcian E. (Ted) Hoff Jr.

Date of birth

Oct. 28, 1937

Family

Wife, Judy; three daughters, Carolyn, Lisa, and Jill

Education

BS, 1958, Rensselaer Polytechnic Institute, Troy, N.Y.; MS, 1959, Ph.D., 1962, Stanford University, California, all in electrical engineering

First job

Planting cabbages

First electronics job

Technician, General Railway Signal Co., Rochester, N.Y.

Biggest surprise in career

Media hysteria over the microprocessor

Patents

17

Books recently read

Introduction to Nuclear Reactor Theory by John R. Lamarsh; A Compiler Generator by William M. McKeeman, James J. Horning, and David B. Wortman

People most respected

Intel Corp. founders Robert Noyce and Gordon Moore, Intel chief executive officer Andrew Grove

Favorite restaurants

Postrio and Bella Voce in San Francisco, Beausejour in Los Altos, Calif.

Favorite movies

2001, Dr. Strangelove

Motto

“If it works, it’s aesthetic”

Leisure activities

Playing with electronics; attending operas and concerts; going to the theater, body surfing in Hawaii; walking his Alaskan malamutes

Car

Porsche 944

Management creed

“The best motivation is self-motivation”

Organizational memberships

IEEE, Sigma Xi

Major awards

Stuart Balantine Medal of the Franklin Institute, IEEE Cledo Brunetti Award, IEEE Centennial Medal, IEEE Fellow

“One result of all our work on microprocessors that has always pleased me,” Hoff told IEEE Spectrum, “is that we got computers away from those people.

By 1968 student hostility to the government over the Vietnam War was growing and life for researchers on campus who, like Hoff, relied on government funding was looking as if it might get uncomfortable. Hoff had already been contemplating the possibilities of industrial jobs when he received a telephone call from Robert Noyce, who told him he was starting a new company, Intel Corp., and had heard Hoff might be interested in a job. He asked Hoff where the semiconductor integrated circuit business would find its next growth area. “Memories,” Hoff replied.

That was the answer Noyce had in mind (Intel was launched as a memory manufacturer), and that year he hired Hoff as a member of the technical staff, Intel’s 12th employee. Working on memory technology, Hoff soon received a patent for a cell for use in MOS random-access integrated circuit memory. Moving on to become manager of applications research, he had the first customer contact of his career.

“Engineering people tend to have a very haughty attitude toward marketing, but I discovered you learn a tremendous amount if you keep your eyes and ears open in the field.
—Hoff

“Engineering people tend to have a very haughty attitude toward marketing,” Hoff said, “but I discovered you learn a tremendous amount if you keep your eyes and ears open in the field. Trying to understand what problems people are trying to solve is very helpful. People back in the lab who don’t have that contact are working at a disadvantage.”

From 12 Chips to One Microprocessor

One group of customers with whom Hoff made contact were from Busicom Corp., Tokyo. Busicom had hired Intel to develop a set of custom chips for a low-cost calculator and had sent three engineers to Santa Clara to work on the chip designs. Hoff was assigned to look after them, getting them pencils and paper, showing them where the lunchroom was—nothing technical.

But the technical part of Hoff’s mind has no off-switch, and he quickly concluded that the engineers were going in the wrong direction. Twelve chips, each with more than 3000 transistors and 36 leads, were to handle different elements of the calculator logic and controls, and he surmised the packaging alone would cost more than the targeted retail price of the calculator. Hoff was struck by the complexity of this tiny calculator, compared with the simplicity of the PDP-8 minicomputer he was currently using in another project, and he concluded that a simple computer that could handle the functions of a calculator could be designed with about 1900 transistors. Given Intel’s advanced MOS process, all these, he felt, could fit on a single chip.

Marcian E. «Ted» Hoff

The Busicom engineers had no interest in dumping their design in favor of Hoff’s unproved proposal. But Hoff, with Noyce’s blessing, started working on the project. Soon Mazor, then a research engineer at Intel, joined him, and the two pursued Hoff’s ideas, developing a simple instruction set that could be implemented with about 2000 transistors. They showed that the one set of instructions could handle decimal addition, scan a keyboard, maintain a display, and perform other functions that were allocated to separate chips in the Busicom design.

In October 1969, Hoff, Mazor, and the three Japanese engineers met with Busicom management, visiting from Japan, and described their divergent approaches. Busicom’s managers chose Hoff’s approach, partly, Hoff said, because they understood that the chip could have varied applications beyond that of a calculator. The project was given the internal moniker “4004.”

Federico Faggin, now president and chief executive officer of Synaptics Inc., San Jose, Calif., was assigned to design the chip, and in nine months came up with working prototypes of a 4-bit, 2300-transistor “microprogrammable computer on a chip.” Busicom received its first shipment of the devices in February 1971.

Faggin recalled that when he began implementing the microprocessor, Hoff seemed to have lost interest in the project, and rarely interacted with him. Hoff was already working on his next project, the preliminary design of an 8-bit microprogrammable computer for Computer Terminals Corp., San Antonio, Texas, which, architected by Computer Terminals, was named the 8008. Hoff always “had to do very cutting-edge work,” Faggin told Spectrum. “I could see a tension in him to always be at the forefront of what was happening.

In those early Intel days, Mazor recalled that Hoff had a number of ideas for projects, many of which, though not commercially successful, proved prescient: a RAM chip that would act like a digital camera and capture an image in memory, a video game with moving spaceships, a device for programming erasable programmable ROMs, and computer-aided design tools intended for logic simulation.

The Intel marketing department they estimated that sales [of microprocessors] might total only 2000 chips a year.

Meanwhile, the microprocessor revolution was gearing up, albeit slowly. Hoff joined Faggin as a microprocessor evangelist, trying to convince people that general-purpose one chip computers made sense. Hoff said his toughest sell was to the Intel marketing department.

“They were rather hostile to the idea,” he recalled, for several reasons. First, they felt that all the chips Intel could make would go for several years to one company, so there was little point in marketing them to others. Second, they told Hoff, ‘‘We have diode salesman out there struggling like crazy to sell memories, and you want them to sell computers? You’re crazy.” And finally, they estimated that sales might total only 2000 chips a year.

But word went out. In May 1971 an article in Datamation magazine mentioned the product, and the following November Intel produced its first ad for the 4004 CPU and placed it in Electronic News. By 1972 stories about the miracle of what began being called the microprocessor started appearing regularly in the press, and Intel’s competitors followed its lead by launching microprocessor products of their own.

Hoff never even considered patenting the microprocessor. To him the invention seemed to be obvious.

One step Hoff did not take at that time was apply for a patent, even though he had already successfully patented several inventions. (Later, with Mazor and Faggin he filed for and was granted a patent for a “memory system for a multi-chip digital computer. ”)

Looking back, Hoff recalled that he never even considered patenting the microprocessor in those days. To him the invention seemed to be obvious, and obviousness was considered grounds for rejecting a patent application (though, Hoff said bitterly, the patent office currently seems to ignore that rule). It was obvious to Hoff that if in one year a computer could be built with 1000 circuits on100 chips, and if in the following year those 1000 circuits could be put onto10 chips, eventually those 1000 circuits could be con­ structed on one chip.

Instead of patenting, Hoff in March 1970 published an article in the proceedings of the 1970 IEEE International Convention that stated: “An entirely new approach to design of very small computers is made possible by the vast circuit complexity possible with MOS technology. With from 1000 to 6000 MOS devices per chip, an entire central processor may be fabricated on a single chip.”

But in December 1970, an independent inventor outside the cliquish semiconductor industry, Gilbert Hyatt, filed for a patent on a processor and mentioned that it was to be made on a single chip. In 1990, after numerous appeals and extensions, Hyatt was granted that patent and began collecting royalties from many microprocessor manufacturers. Currently, though history traces today’s microprocessor back to Hoff, Mazor, and Faggin, the legal rights to the invention belong to Hyatt.

The Invention of the Codec

While the microprocessor has proved to be his most celebrated achievement, Hoff does not view it as his biggest technical breakthrough. That designation he reserves for the single-chip analog-to-digital/ digital-to-analog coder/decoder (codec).

“Now that work was an exciting technical challenge,” Hoff recollected with some glee, “because there were so many who said it couldn’t be done.”

The project was kicked off by Noyce, who spotted the telephone industry as ripe for new technology, and urged Hoff to find an important product for that market. Studying telephone communications, Hoff and several other researchers saw that digitized voice transmission, then being used between central offices, depended on the use of complex expensive codecs that tied into electromechanical switches.

”We thought,” Hoff told Spectrum, “we could integrate this, the analog-to-digital conversion, on a chip, and then use these circuits as the basis for switching.”

Besides reducing the cost of the systems to the telephone company, such chips would enable companies to build small branch exchanges that handled switching electronically.

Hoff and his group developed a multiplexed approach to conversion in which a single converter is shared by the transmit and receive channels. They also established a number of other techniques for conversion and decoding that Hoff saw as not being obvious and for which he received patents.

With that project’s completion in 1980, after six years of effort, and its transfer to Intel’s manufacturing facility in Chandler, Ariz., Hoff became an Intel Fellow, free to pursue whatever technology interested him. What interested him was returning to his work on adaptive structures, combining the concepts he had wrestled with at Stanford with the power of the microprocessor in the service of speech recognition. After a year he built a recognition system that Intel marketed for several years.

A prime customer for the system was the automotive industry. Its inspectors used the systems to help them check out a car as it finally left the assembly line. When an inspector noted out loud various problems that needed fixing, the system would prompt him for further information, and log his responses in a computer.

From Intel to Atari

Though his position as an Intel Fellow gave Hoff a fair amount of freedom, he found himself getting bored. Intel’s success in microprocessors by 1983 had turned it into a chip supplier, and other companies were designing the chips into systems.

“I had always been more interested in systems than in chips,” Hoff said, “and I had been at Intel for 14 years, at a time when the average stay at a company in Silicon Valley was three years. I was overdue for a move.”

Again, Hoff had not gone beyond thinking about leaving Intel when a new job came to him. Atari Inc., Sunnyvale, Calif., then a booming video game company owned by Warner Communications Inc. and a major user of microprocessors, was looking for a vice president of corporate technology. In February 1983, after discussing the scope of the ideas that Atari researchers were pursuing, Hoff latched onto the opportunity.

Intel from the start had a structured, highly controlled culture. At Atari, chaos reigned.

Intel from the start had a structured, highly controlled culture. At Atari, chaos reigned. Under Hoff were research laboratories in Sunnyvale, Los Angeles, and Grass Valley, Calif.; Cambridge, Mass.; and New York City. Researchers were working on picture telephones, electronic aids for joggers, computer controls that gave tactile feedback, graphical environments akin to today’s virtual reality, digital sound synthesis, advanced personal computers, and software distribution via FM sidebands.

But Hoff had barely had time to learn about all the research projects under way before the video game business took a well-publicized plunge. Without solid internal controls, Atari was unable to determine how well its games were selling at the retail point, and distributors were returning hundreds of thousands of cartridges and game machines. Hoff began receiving orders for staff cuts monthly.

“It would have been one thing if I had known I had to cut back to, say, one-quarter the size of my group,” he told Spectrum. “But when every month you find you have to cut another chunk, morale really drops.”

In July 1984, while Hoff was at his 30th high school reunion, Warner sold Atari to Jack Tramiel. Hoff then had to choose between convincing Tramiel that he could play a role in a narrowly focused company uninterested in funding futuristic research, and allowing Warner to buy out his contract. He chose the latter.

Looking back, most of the people who were at Atari in those days now view them darkly. But Hoff recalls his year there as an enjoyable and ultimately useful experience. “Maybe I look at it more positively than I should,” he said, “but it turned out to be a good transition for me, and the life I have now is a very nice one.

“Whenever you are working on one problem, there is always another problem over here that seems more interesting.”
—Hoff

He now spends half his time as a consultant and half pursuing technical projects of his own devising—a read­out device for machine tools, various types of frame grabbers, pattern recognition, and techniques for analog-to-digital conversion. This variegated schedule is perfect for him. He has always felt himself to be a generalist, and has had trouble focusing on just one technology.

“It’s easy for me to get distracted,” he said. “Whenever you are working on one problem, there is always another problem over here that seems more interesting. But now it is more likely that my own projects get delayed, rather than things critical to other people and their employment.”

Faggin for one is not surprised that such independent work appeals to Hoff. “He never was the gregarious type,” Faggin said. “He liked introverted work, the thinking, the figuring out of new things. That is what he is good at. I always was impressed how he was able to visualize an architecture for a new IC, practically on the spot.”

“He comes up with idea after idea, situation after situation. I think if he wanted to, Ted could sit down and crank out a patent a month.”
—Gary Summers

Said Gary Summers, president and chief executive officer of Teklicon Inc., Mountain View, the consulting firm that employs Hoff today: “He comes up with idea after idea, situation after situation. I think if he wanted to, Ted could sit down and crank out a patent a month.”

“There is no doubt in my mind that he is a genius,” Mazor stated. Summers readily concurred.

Hoff’s first project after Atari was a voice­controlled music synthesizer, which gave off the sound of a selected instrument when someone sang into it. Hoff’s biggest contribution to the project was a system that ensured that the emerging notes would be in tune, or at least harmonically complement the tune, even when the singer strayed off key. He scored another patent for this system, and the gadget was sold briefly through the Sharper Image catalog, but never became a big success.

Hoff still contributes occasionally to product designs. At Teklicon, however, where he is vice president and chief technical officer, most of his consulting is done for lawyers. Hoff has a unique combination of long experience with electronic design and long-standing pack rat habits. His home workshop contains about eight personal computers of different makes and vintages, five oscilloscopes, including a vintage Tektronix 545 scope, 15000 ICs inventoried and filed, and shelves loaded with IC data books dating right back to the 1960s.

“If my washing machine breaks down, I call the repairman. Most clever engineers would buy the replacement gear and install it. Ted is capable of analyzing the reason the gear failed in the first place, redesigning a better gear from basic principles, carving it out of wood, casting it at his home, and dynamically balancing it on his lathe before installing it.
—Mazor

When a lawyer shows him a patent disclosure, even one decades old, he can determine whether or not it could then have been “reduced to practice” and whether it provided sufficient information to allow “one of ordinary skill in the art” to practice the invention. Then he can build a model proving his conclusion, using vintage components from his collection, and demonstrate the model in court as an expert witness. This model-building can get very basic. On Spectrum’s visit, Rochelle salt crystals that Hoff attempted to grow for a recent court demonstration littered his workshop floor, next to metal-working equipment that he uses to build cases for his models.

Hoff sees this ability to get down to basics as one of his strengths. “I relate things to fundamental principles,” he said. “People who don’t question the assumptions made going into a problem often end up solving the wrong problem.”

Mazor said, “If my washing machine breaks down, I call the repairman. Most clever engineers would buy the replacement gear and install it. Ted is capable of analyzing the reason the gear failed in the first place, redesigning a better gear from basic principles, carving it out of wood, casting it at his home, and dynamically balancing it on his lathe before installing it.”

Doing legal detective work appeals to Hoff for another reason: it gives him an excuse to hunt for interesting “antique” components at flea markets and electronics stores.

Hoff cannot discuss the specifics of patent cases he has been involved with. Several recently were in the video game area; others have involved various IC companies. In a number of cases, Hoff was confident that his side was right, and his side still lost, so he felt little surprise when the microprocessor patent was granted to Hyatt. (After the award was made, though, he did sit down with Hyatt’s patent application and attempted to design a working microprocessor based on Hyatt’s disclosures. He found several incongruities—like a clock rate only suited to bipolar technology with logic that could only be rendered in MOS technology, and logic that required far too many transistors to put on a chip, proving in his mind that the award was incorrect. )

Seeing someone else get credit for the microprocessor, particularly in recent media reports, “is irritating,” Hoff told Spectrum, “but I’m not going to let it bother me, because I know what I did, I know what all the other people on our project did, and I know what kind of company Intel is. And I know that I was where the action was.”

Editor’s note: Hoff retired from Teklicon in 2007. He currently serves as a judge for the Collegiate Inventors Competition, held annually by the National Inventors Hall of Fame. These days, his main technical interests surround energy, water, and climate change.

Keep Reading ↓Show less

Zilog Z-80 — The Immortal of the Eighties / Sudo Null IT News instantly overgrown with many compatible analogues — both more affordable and more advanced, technically interesting. But long before companies crossed swords for buyers of the original 186 and their successors, competition also touched the first key chip in the history of the computer industry — the Intel 8080.

Intel 8080

The release of the Intel 8080 processor has become a catalyst for the development of the development and production of microprocessors that have found application in a variety of fields and areas. The release of various 8-bit solutions (such as Motorola 6800 or MOS Technologies 6502), as well as the production of fully compatible clone solutions (manufactured, in particular, by AMD), determined the needs of the market in the mid-70s, which can partly be called and the cause of the Z-80.

After leaving Intel, Federico Fagin and Ralph Ungermann began discussing what products they could develop. Ungermann was attracted by the idea of ​​creating electronic typewriters. And Fagin wanted to use the concept of the original 4004 microprocessor in a single-chip microcontroller that would contain all the memory and I / O devices with a processor on a single silicon element.

Federico Fagin (left) and Ralf Ungermann

Rumors about this reached the journalists from Electronics News, and in the next issue of the commercial magazine there was a large article that Fagin and Ungermann were going to go into the processor business together.

A week later, an unexpected visitor came to the office they rented in the prestigious area of ​​Los Altos, a few miles from Palo Alto. He introduced himself as an employee of a subsidiary of Exxon, the world’s largest oil company founded to invest in start-up companies. Exxon Enterprises, as his company was called, became interested in Fagin and Ungermann. If they want to develop a new microprocessor, the firm could support them.

The deal was closed quickly. The company received a controlling stake of 51% in exchange for $1.5 million.

Ungermann came up with a good name for the new business — «Zilog». This meant that the company considered itself «the last word [Z] in integral [I] logic [LOG]».

Two months later, Fagin had another idea. He followed the fate of his old project, the Intel 8080 processor. From the rave reviews in the commercial press, from the fact that companies across America were starting to use it, Fagin realized that it would be foolish not to capitalize on the wave of general-purpose microprocessor boom. December 19For 74 years, he convinced Ungermann to leave the controller project and switch to developing an improved version of the 8080 chip.

In an attempt to reconnect with Andy Grove, Faggin came to Intel with his ideas and offered to organize the production of an improved 8080 under a contract with Intel. However, his proposals were rejected.

Fajin was later approached by Masatoshi Shima, an engineer who oversaw the 4004 project and then moved to Intel, to apply for a job. Since Seema was developing the detailed blueprint for the 8080, Faggin was happy to invite him.

Masatoshi Shima

The new Zilog chip was built faster than Fajin and Ungermann expected. Working 80 hours a week on the chip, Fagin completed the architecture in less than nine months.
At first, Zilog united only three of them, they were assisted by several draftsmen, so the question of their own production of the chip was not raised. Faggin drew the drawing on graph paper with a stylus; Sima followed the creation of templates according to the drawings. The finished set of templates was sent for production to Mostek, a spin-off from Texas Instruments, which at that time was one of Intel’s strongest competitors in the MOS technology market. By March 1976 years Zilog got a working device capable of conquering the world.

The Z-80 is a third generation single-chip microprocessor with 8-bit data and 16-bit addresses. It contained 8500 transistors and was produced according to 3-micron process standards. The area of ​​the crystal was 22.54 mm 2 .
The maximum amount of directly addressable memory and directly addressable I/O space is 64 KB each (the I/O space of the 8080 microprocessor is 256 bytes).

Zilog Z-80

The Z80 microprocessor instruction set includes 158 instructions, 78 of which are completely similar to the 8080 microprocessor instructions, although they have different mnemonics. In addition to the arithmetic logic instructions traditional for 8-bit microprocessors, the Z80 has instructions that work with individual bits, and also facilitate the processing of character information.

Microprocessors were produced with various operating clock frequencies from 2.5 to 8 MHz (for 8080A — 2.5 MHz), which provided very high speed for those times.
Finally, a dynamic memory regeneration counter is implemented on the microprocessor chip itself, which makes it possible to drastically reduce the number of parts in simple microcomputers compared to 8080.

The Z-80 microprocessor was produced in a 40-pin DIP package, the most common for eight-bit microprocessors. Unlike the Intel 8080 microprocessor, the Z-80 does not require specific additional circuits (two-phase clock generator and system controller) for its operation, which greatly simplifies the design of the processor module. In addition, the Z80 requires a single supply voltage of +5 V to operate, instead of three voltages for the 8080 (+5, -5 and +12 V).

At only $200, the Z-80 also appealed to individual consumers who used to spend long nights at the amateur radio and now tinker with electronics, thanks to the triumph of large-scale circuit integration. The Z-80 allowed them to think for the first time about building a computer themselves. There were fewer computers in the world in 1974 than there were airplanes in 1997. So assembling a computer at the time was about the same as building a Boeing 767 in the backyard today. However, it wasn’t much scarier.

Having spent $400,000 to develop its chip, Zilog could not afford to pay generously for an army of sales agents. Instead, the company bought a seat in Electronic News magazine and published a series of promotional articles.

Due to the spread of the Z80 around the world, Zilog has been awarded many contracts for the production of its microprocessors in various parts of the world. After entering the market in 1976, the main partners in the United States were Synertek and Mostek, which produced the first series of Z-80 processors (at the end of 1976, Zilog opened its own factories, and provided the American market with the Z80 on its own). In Japan, the production of Z80 launched companies such as Toshiba and Hitachi. Due to the incredible popularity and demand for the Z80, many analogue manufacturers operated without a license, so in total less than half of all Z-80s produced turned out to be licensed products from Zilog or its official partners.

In our country, the Z80 is known primarily for the Sinclair Spectrum gaming computer, extremely popular in the second half of the 1980s.

Sinclair ZX Spectrum

However, the scope of this microprocessor was much wider. In particular, it is he who is the “brain” of the French Exocet anti-ship missiles (in 1982, the Argentine Mirage fighter sank the English destroyer Sheffield, one of the most modern warships at that time, with such a missile).

The Zilog Z80 processor not only became incredibly popular after entering the market, but also proved to be a long-lived record holder — for decades it has been present in various systems as one of the specialized microprocessors, used in computer, portable, and business systems of the most different levels and purposes. In the 80s, it became part of portable systems such as Sharp PC-1500 and Cambridge Z88, at 90-e began to be used in engineering calculators of the TI-81 family from Texas Instruments.

TI-81

It was also used as a musical instrument microprocessor (eg the legendary Prophet-5 MIDI keyboard), and many embedded systems still include the legendary microprocessor as part of their solutions.

Prophet-5

More than 40 years after its introduction on the market, the Zilog Z80 has been and remains indispensable in dozens of different computer systems, and can serve as an example of how computer technology, which appeared at the dawn of the personal computer era, are still part of our daily lives.

Our video based on the article — TYK

The author of the article is Alexander Lis.

Zilog Z80 CPU Test Suite • ZX Spectrum

Language

  • Russian
  • English

Control

  • Keyboard(?)

Players

  • One
  • Description
  • Description (EN)
  • Information

Welcome to the Zilog Z80 CPU test suite.

This set of programs is designed to help emulator authors achieve the required level of Z80 emulation accuracy. Each of the included programs performs exhaustive calculations using each of the tested Z80 instructions, compares the result with the values ​​obtained on a real 48K Spectrum with a Zilog Z80 onboard, and reports any deviations found.

The following options are available:

— z80full — tests all flags and registers.
— z80doc — tests all registers, but only officially documented flags.
— z80flags — tests all flags, ignoring registers.
— z80docflags — only tests documented flags, ignores case.
— z80ccf — Tests all flags after executing CCF after each tested instruction.
— z80memptr — tests all flags after executing BIT N,(HL) after each tested instruction.

The first four are standard CPU emulation tests. The CCF variant is used to carefully test the true behavior of the SCF/CCF after each Z80 instruction. Finally, the MEMPTR variant can be used to detect problems in the MEMPTR emulation — however, note that the current test suite was not specifically designed for the MEMPTR stress test, so many of the possible problems are likely to go undetected. Eventually, I may add custom MEMPTR tests in recent releases.

Enjoy!

Patrik Rak

Official page and updates: https://github.com/raxoft/z80test

Welcome to the Zilog Z80 CPU test suite.

This set of programs is intended to help the emulator authors to reach the
desired level of the CPU emulation authenticity. Each of the included programs
performs an exhaustive computation using each of the tested Z80 instructions,
compares the results with values ​​obtained from a real 48K Spectrum with Zilog Z80 CPU,
and reports any deviations detected.

The following variants are available:

– z80full – tests all flags and registers.
— z80doc — tests all registers, but only officially documented flags.
— z80flags — tests all flags, ignores registers.
— z80docflags — tests documented flags only, ignores registers.
— z80ccf — tests all flags after executing CCF after each instruction tested.
— z80memptr — tests all flags after executing BIT N,(HL) after each instruction tested.

The first four are the standard tests for CPU emulation. The CCF variant is
used to thoroughly test the authentic SCF/CCF behavior after each Z80
instruction. Finally the MEMPTR variant can be used to discover problems in
the MEMPTR emulation – however note that the current set of test was not
specifically designed to stress test MEMPTR, so many of the possible
problems are very likely left undetected. I may eventually add specific
MEMPTR tests in later releases.

Enjoy!

Patrik Rak

Official download and updates: https://github.com/raxoft/z80test

The Zilog Z80 CPU Test Suite game runs directly on the site. This is a programming application published in the Czech Republic in 2012 by the Raxoft creative team, written by Patrik Rak.

More games of this genre

The game doesn’t start or is buggy, or you can’t pass? Ask in the comments.

Saved games[X]

Help[X]

Help is on the way!

Don’t forget to periodically save game progress on the server (by pressing F8 ) in order to confidently move forward!

If you are a guest on the site, then the progress will be saved only in the browser’s memory and will be lost when you close it.