Information AboutZilog Z-80 |
| CATEGORIES ABOUT ZILOG Z80 | |
| microprocessors | |
|
The Zilog Z80 is an 8-bit Microprocessor designed and sold by Zilog from July 1976 onwards. It was widely used both in desktop and Embedded Computer designs as well as for defense purposes. The Z80 and its derivatives and clones make up one of the most commonly used CPU families of all time, and, along with the MOS 6502 family, dominated the 8-bit microcomputer market from the late 1970s to the mid-1980s. Although Zilog made attempts with 16-bit ( Z800 / Z280 ) and 32-bit ( Z380 ) versions of the 8/16-bit Z80-architecture, these chips never caught on. The company was also trying hard in the Workstation market with its Z8000 and 32-bit Z80000 (both technically unrelated to Z80). In recent decades Zilog has concentrated on the ever-growing market for Embedded Systems , and the most recent CPU family, the 8/16/ 24-bit EZ80 , a fast Z80 with a Linear 16 MB address range has been successful. BRIEF HISTORY AND OVERVIEW chip package pinout.]] The Z80 came about when Federico Faggin left Intel after working on the 8080 , and by July 1976 Zilog had the Z80 on the market. It was designed to be binary compatible with the Intel 8080 so that most 8080 code could run unmodified on it, notably the CP/M Operating System . The Z80 offered many real improvements over the 8080:
The Z80 quickly took over from the 8080 in the market, and became one of the most popular 8-bit CPUs. Later versions increased in speed from the early models' 2.5 MHz up to as much as 20 MHz. Perhaps a key to the success of the Z80 was the built-in DRAM Refresh , which allowed systems to be built with fewer support chips. TECHNICAL DESCRIPTION Programming model and register set The programming model and register set are conventional and similar to many other processors, such as the related X86 family. The 8080 compatible registers AF,BC,DE,HL are ''duplicated'' as two separate banks in the Z80, where the processor can quickly switch from one bank to the other; a feature useful for speeding up responses to single level, high priority interrupts. This makes sense as the Z80 (like, for instance, the 6502 ) was really intended for Embedded use, not for personal computers or the, yet to be invented, Home Computers .''According to one of the designers, Masatoshi Shima , the market focus was on high performance printers, high-end cash registers, and intelligent terminals.'' ''The 8080 compatible registers:''
''Registers introduced with the Z80:''
There is no ''direct'' access to the alternate registers, instead two special instructions, ''EX AF,AF' ''and ''EXX'', each toggles one of two multiplexer flipflops; this enables fast context switches for interrupt service routines: EX AF,AF' may be used alone (for really simple and fast interrupt routines) or toghether with EXX to swap the whole AF,BC,DE,HL set; still much faster than pushing the same registers on the stack (slower, or lower priority, interrupts, normally use the stack to store registers). The R register increments''While R is an 8 bit register, it wraps around at 128 instead of 256. If the programmer stores a value in the register, its high bit will be preserved regardless of what the CPU does to the remaining 7 bits. Incorrect implementation of this behaviour is a common source of problems when running games on emulated Z80-machines'' each time the CPU fetches an opcode (or opcode prefix) and has therefore no simple relationship with program execution. This has sometimes been used to generate Pseudorandom numbers in games, and also in software protection schemes. The Z80 assembly language Background The orginal intel 8008 assembly language was based on a very simple (but systematic) syntax inherited from the Datapoint 2200 design, this orginal syntax was later transformed into a little more traditional assembly language form for the 8008, and also extended to accommodate the new addressing possibilities in the 8080. In this process, the mnemonic ''L'', for ''load'', was replaced by various abbreviations of the words ''load'', ''store'' and ''move'', intermixed with other symbolic letters; the mnemonic ''M'', for ''memory'' (refererenced by HL), was lifted out from within the instruction mnemonic and became an ''operand''; registers also became very inconsistently denoted, sometimes by abbreviated operands (''MVI D, LXI H etc''), or within the instruction mnemonic itself (''LDA, LHLD etc''), or both (''LDAX B, STAX D etc''). Datapoint 2200 & i8008 i8080 Z80 i8086 (ca -1973) (ca 1974) (1976) (1978) LBC MOV B,C LD B,C MOV BL,CL -- LDAX B LD A,(BC) MOV AL, {Link without Title} LAM MOV A,M LD A,(HL) MOV AL, {Link without Title} LBM MOV B,M LD B,(HL) MOV BL, {Link without Title} -- STAX D LD (DE),A MOV {Link without Title} ,AL LMA MOV M,A LD (HL),A MOV {Link without Title} ,AL LMC MOV M,C LD (HL),C MOV {Link without Title} ,CL LDI 56 MVI D,56 LD D,56 MOV DL,56 LMI 56 MVI M,56 LD (HL),56 MOV byte ptr {Link without Title} ,56 -- LDA 1234 LD A,(1234) MOV AL, {Link without Title} -- STA 1234 LD (1234),A MOV {Link without Title} ,AL -- -- LD B,(IX+56) MOV BL, {Link without Title} -- -- LD (IX+56),C MOV {Link without Title} ,CL -- -- LD (IY+56),78 MOV byte ptr {Link without Title} ,78 -- LXI B,1234 LD BC,1234 MOV BX,1234 -- LXI H,1234 LD HL,1234 MOV BP,1234 -- SHLD 1234 LD (1234),HL MOV {Link without Title} ,BP -- LHLD 1234 LD HL,(1234) MOV BP, {Link without Title} -- -- LD BC,(1234) MOV BX, {Link without Title} -- -- LD IX,(1234) MOV SI, {Link without Title} ''Illustration of four syntaxes, using samples of equivalent, or (for 8086) very similar, load and store instructions.'' The new syntax According to Masatoshi Shima , certain people within Zilog wanted a "computer oriented" image for the company, and also felt they needed to "differentiate" their first product from the 8080. Yet another assembly syntax was therefore developed, but this time with a more systematic approach:
These principles made it straighforward to find names and forms for all new Z80 instructions, as well as orthogonalizations of old ones, such as LD BC,(1234) above. It it interesting to see the resemblance between Z80 and 8086 syntax, as illustrated by the table. Apart from naming differences, and despite a certain discreptance in basic register structure, the two are virtually isomorphous for a large portion of Z80 instructions.''Whether this is due to some common influence on both design teams (in addition to 8080), a coincedent, or otherwise, is unknown so far.'' ''Surprisingly, only quite superficial similarities (such as the word MOV, or the letter X, for extended register) exists between the 8080 and 8086 assembly languages, despite the fact that 8080 programs can be compiled into x86 code (using a special assembler).'' Instruction set and encoding The Z80 uses 252 out of the available 256 codes as single byte opcodes; the four remaining codes are used extensively as opcode prefixes; ED and CB enables extra instructions and DD or FD selects IX+d or IY+d (in place of HL). This scheme gives the Z80 a large number of permutations of instructions and registers; Zilog categorizes these into 158 different "instruction types", 78 of which are the same as those of the Intel 8080 (allowed operation of 8080 programs on a Z80). The Zilog documentaion further groups instructions into the following categories: 8-bit load 16-bit load Exchange, block transfer, and search 8-bit arithmetic and logic operations General purpose arithmetic and CPU control 16-bit arithmetic Rotate and shift Bit set, reset, and test Jump Call, return, and restart Input and output The bit set, reset, and test instructions are well adapted to I/O control. Instructions takes a minimum of 4 clock cycles to execute, with some of the more complex memory operations taking up to 21 clock cycles; no multiply instruction is available in the original Z80. Compatible peripherals Zilog introduced a number of peripheral parts for the Z80, which all supported the Z80's interrupt handling system and I/O address space. These included the CTC (Counter-Timer-Circuit), the SIO (Serial Input Output), the DMA (DIrect Memory Access), the PIO (Parallel Input-Output) and the DART (Dual Asynchronous Receiver Transmitter). As the product line developed, low-power, high-speed and CMOS versions of these chips were produced. In the same manner as the x86 family, but unlike contemporary 8-bit processors, like the Motorola 6800 and Mos Technology 6502, the Z80 and 8080 had a separate control line and address space for I/O instructions. While some Z80-based Computers used "Motorola-style" memory mapped input/output devices, usually the I/O space was used to address one of the many Zilog peripheral chips compatible with the Z80. Zilog I/O chips supported the Z80's new Mode 2 interrupts which simplified interrupt handling for large numbers of peripherals. SECOND SOURCES, CLONES, EMULATION 's μPD780C Z80 clone on a ZX Spectrum board.]] , a Soviet Z80 clone.]] Mostek MK3880 and SGS-Thompson Z8400 (now ST Microelectronics ) were both second-sources for the Z80. Sharp and NEC developed clones in NMOS , the LH-0080 and µPD780C respectively. Toshiba made a CMOS -version, the TMPZ84C00, which is believed (but not verified) to be the same design also used by Zilog for its own CMOS Z84C00. There were also Z80-chips marked GoldStar and LG . In East Germany , an unlicensed clone of the Z80, known as the U880 , was manufactured. It was very popular and was used in Robotron 's and VEB Mikroelektronik Mühlhausen's computer systems (e.g. the KC85 -series) and also in many self-made computer systems (ex. COMP JU+TER). Also, several fully compatible clones of Z80 were created in the Soviet Union , notable ones being the КP1858ВМ1 (there was an unproven rumor that it contains the East-German U880 chip inside) and T34BM1 (this one contains a real Soviet chip inside). Another Soviet CPU, the KP580ИK80 (later marked as KP580BM80), was a clone of the Z80's predecessor, the Intel 8080. A Z80A Polish clone was also used in the ZX Spectrum clones produced by Polish company Elwro . In Factory, based in Bucharest ), CIP-02 and CIP-03 (by the Electronica Factory, located in Bucharest ) and TimS (by the Timisoara Technical University). Today , a functionally equivalent CPU core (T80 & TV80) is available free under a BSD style license as VHDL and Verilog source. The VHDL version, once synthesized, can be clocked up to 35 MHz on a Xilinx Spartan II FPGA . It's often somewhat cheaper to use a more traditional solution, however. Software Emulation of the Z80 instruction set on modern PCs runs faster than the original Z80 CPU ran and is used today for Home Computer Simulator s (such as ZX Spectrum ) and also for video game emulators such as MAME , which executes 1980s vintage video games. SUCCESSORS AND DERIVATIVES Hitachi developed an enhanced CMOS version, HD64180, which was later second-sourced by Zilog, both as Z64180 and as the slighly modified Z180 . Nintendo 's Game Boy and Game Boy Color handheld game systems used a Z80 clone manufactured by Sharp Corporation , which had a slightly different instruction set. The Sharp Z80 in the Game Boy Color is notable for its ability to selectively double its clock speed when running Game Boy Color software. Some of the index register instructions of the Z80 Instruction Set were not much faster''This represented no severe problem however, as they could often save space, if not time.'' than equivalent sequences of simpler operations. The 10-year-newer HD64180 / Z180 design had more "chip area", permitting a somewhat more efficient implementation using an additional ALU . However, it is not until 2001 and the advent of the fast pipelined EZ80 that operations involving IX and IY finally becomes nearly as fast as it is technically possible''Given the fixed Z80 encodings and an 8-bit databus with one fetch per cycle.'' to make them. The ill fated NMOS Z800 and CMOS Z280 were quite fast Z80-implementations (before the HD64180 / Z180 ), but the Z280 was too mini-computer inspired and too complex to be a natural choice for most embedded applications. In contrast, the plain ''CMOS'' Z80 has remained popular, along with the compatible Z180 and eZ80 families. NOTABLE USES In desktop computers During the late 1970s and early 1980s, the Z80 was used in a great number of fairly anonymous business-oriented machines with the CP/M operating system; a CPU/OS combination that dominated the market in much the same way that Windows based machines do Today . Two well-known examples of Z80+CP/M business computers are the portable Osborne 1 and the Kaypro series. Manufacturers of such systems included Televideo , Xerox and a number of more obscure firms. Some systems used multi-tasking operating system software to share the one processor between several concurrent users. Home Computer s using the Z80 include the following:
''For a more comprehensive overview, see the List Of Home Computers Using The Z80 .''
In embedded systems and consumer electronics The Zilog Z80 has long been a popular microprocessor in Embedded System s and Microcontroller cores, where it remains in widespread use today. The following list provides a few examples of such applications of the Z80, including uses in Consumer Electronic s products. Industrial/embedded:
Consumer electronics:
SEE ALSO NOTES AND REFERENCES EXTERNAL LINKS
REFERENCES ''Zilog Components Data Book'', Zilog, Campbell California, 1985, no ISBN |
|
|