Talk:Zilog Z80
From Wikipedia, the free encyclopedia
[edit] R register
I'm sure I remember the R register wrapping around at 128 and not at 256. You could store an 8 bit value in it though and retrieve it later (modulo having to subtract stuff for the instructions executed in between) and have the MSB preserved. If I'm remembering this correctly it is important enough to add to the article. I suppose it's possible that this was a machine-specific bug. DrHydeous
That was definitely true of the original Z80 CPU. Some of the later variants and derivatives may have different behavior. I agree that it's worth noting in the article. --Brouhaha 09:04, 19 April 2006 (UTC)
Done :-) I've also explained how the value in R changes instead of just saying that it "incremented automatically with no simple relationship to program execution" DrHydeous 20 Apr 2006
- Unfortunately, you've got it wrong. It is incremented on every M1 cycle, not on every memory read. --Pak21 14:32, 20 April 2006 (UTC)
[edit] Article title
Following the naming convention for Wikipedia microprocessor articles, I moved the Z80 article back to its Zilog Z80 name after a contributor renamed it Z80. The redirect should be sufficient. --Wernher 10:55, 23 Apr 2004 (UTC)
Should the list of advantages not also include the important fact that the Z80 did not need complex glue as the 8080 did up until the 8085. That was a big factor too Alan
[edit] "The Z80 was also used in the defense industry"
While military uses of the Z80 may well be worth of investigating, this sentence alone, and slighly out of context, is better left off the article. I've moved it here as a reminder to anyone who knows of any specific uses, or can otherwise elaborate on this sentence.
LjL 00:16, 28 Apr 2005 (UTC)
Raytheon use a Z80 core in some of their older GPS and interrogator systems as well as the good old Z80 husky (which it was my job to stick in a freezer and then boiling water to see if it died - which it didn't).
[edit] 6502 stuff
The Z80, and its primary competitor, the MOS Technology 6502, sparked off a series of computer projects that would eventually result in the home computer revolution of the 1980s.
Aside from the vacuity of the statement, I don't even think it's strictly true. The Apple II and Commodore PET, later Commodore 64, and the Atari game/computer systems, were far more significant in the home computer area than the Z80 systems were, at least based on numbers sold. Z80s were important, but never had the penetration that 6502-based systems had in the old 8-bit days. I've taken the statement out. I speculate that if you were to poll people who've written BASIC programs, 3 out of 4 would say their first program was written on a 6502 machine of some kind (well, my first BASIC was on a PDP 11 but I'm older than dirt).
- The ZX-80 sold in reasonable numbers; the ZX-81 in large numbers, and the Spectrum in pretty impressive volumes. Wasn't the Japanese MSX series designed around the Z80? Then there were many computers that, while they may not have sold in such volume, used the Z80, so that it had an additional importance over and above just the number of chips sold. At university the Z80 appeared to be the preferred reference 8-bit chip (absolutely no idea why, or if this is UK-centric), further making it important. The 6502's popularity, according to Chuck Peddle, was that it was cheaper than the Z80 when he started the Pet line. (I can't remember the interview source for this quote.)Bendel boy 13:27, 9 February 2007 (UTC)
My criticism of Wikipedia is that, often, the article on X immediately sounds like Although X was great and wonderful, it was immediately replaced by/competed with Y which we all know and use today. An article about topic X should stay on topic X at least long enough to give the reader a good idea of what X is, before it branches off to talk about the successors Y and Z, and how Tesla patented W in 1903. --Wtshymanski 16:15, 22 May 2005 (UTC)
- If that is the case, then shouldn't that statement also be removed from the 6502 article? The Z80 may not be as popular as the 6502 in the US, but however for Japan, Europe and the former USSR (cloned Z80s) it was the CPU of choice, sparking off their home computer markets, so I feel that your statement is a little US-centric. I think the statement is fine, but it could be placed somewhere in the history section, rather than the introduction.
- As for your criticism about the divergence in introduction, it seems to be your personal preference. If the majority of articles start off this way, then it seems most people do not have this problem. I think it is a good idea to mention the alternative/competitor/etc in the intro, but again that is personal preference. I would like to know what others feel about this before deciding what to do.
- ADSR6581 16:54, May 22, 2005 (UTC)
-
- I would speculate without any sources at all, that there were more home computers sold between 1980 and 1985 in Minneapolis than in the whole of the then-Soviet Union. I don't think the USSR, at least, had much of a part in the so-called "home computer revolution" . The whole field of personal computers is US-centric. Professionally written encyclopedias in my experience don't start contrasts and comparisons until somewhat further into the article than the introductory paragraph. --Wtshymanski 17:16, 22 May 2005 (UTC)
-
-
- So Europe and Japan didn't have one, either? The field of personal computers certainly wasn't as US-centric in the early 1980s as it is now, and the European and Japanese markets were probably larger than you think. While I would accept that the 6502 had a larger impact, I don't believe that the statement that you've removed was biased. --StuartBrady 18:12, 30 April 2006 (UTC)
-
[edit] eZ80 Memory Address
- The eZ80 website and the wiki entry both state that it can access 16mb of memory directly.
- -- Jeremy Harmon
- I'm not sure what the issue is? The Z80 is an 8-bit CPU, but it does have extended 16-bit instructions (which are slower as well). I assume this really comes down to how the Z80 requests memory from the BUS - does it do two fetches or just one?
- -- Michael Abbott
- The eZ80 actually uses an 8-bit data bus, with a 24-bit address bus. Some registers are extended to 24-bits (ie, UBC, UDE, UHL). When running in this mode (called ADL mode by Zilog), a 24-bit (3 byte) memory access takes 5 cycles (as opposed to 4 cycles in 16-bit/non-ADL mode, called Z80 mode by Zilog). The eZ80 in ADL mode would do three fetches to 'bring in' all three bytes, as opposed to two fetches for Z80 mode.
-
-
- It's interesting to note that the eZ80 generally performs about one instruction per cycle - this is possible because it pipelines the instruction stream (it fetches one instruction, then while it's decoding that instruction it fetches another, and while it executes the first it's decoding the second and fetching a third instruction, etc., to about four levels as far as I can tell). The JP and CALL opcodes 'flush' the pipeline.
-
-
-
- In practice, this works so well that one needs fast memory/IO (12-15 nsec) in order to properly function using zero wait-states.
- -- JN
-
[edit] RISC or CISC?
Does anyone know definitively if the Z80 is RISC or CISC? I'd think it's CISC because of the varying length of opcodes (both in size and tstates), but I'm not sure. --Andy Janata 11:37, 13 September 2005 (UTC)
- Why is this a needful question? "RISC" and "CISC" are technical terms useful in a very narrow class of discussions of the philosophy of design of processors, but in my opinion aren't useful terms when describing historical designs. Read the RISC article and decide if the Z80 fills the bill (I'd be surprised if it did) and then decide if the RISC/CISC nature is as interesting as, say, built-in DRAM refresh. --Wtshymanski 13:53, 13 September 2005 (UTC)
- Agree that it doesn't really matter. But technically, the answer is CISC. Although the precise definition of RISC is somewhat controversial, and many things are now called RISC that would not have been back when RISC was first invented, it is fairly clear that the Z80 doesn't meet ANY of the usual RISC qualifications. The instruction set is not reduced, the instruction length is variable, the instruction execution time is variable, the register organization is ad-hoc, and instructions other than loads and stores have operands or destinations in main memory. --Brouhaha 23:12, 13 September 2005 (UTC)
-
- Thanks for the replies. I was wondering because we were talking about the differences between RISC and CISC in my assembly class. We're using the Atmel AVR ATMega16 in class... I was just wondering what the Z80 (which is used in my TI-83+ that I also program in assembly for) was, and I did think it was CISC. --Andy Janata 19:39, 20 September 2005 (UTC)
-
-
- I believe it's fair to say that RISC was/is about doing without (relatively) slow ROM-tables, either for decoding irregular opcodes or for the sequencing of internal operations. The regular opcode-fields, few and simple instructions, and the regular register-structure was not so much a goal in itself as it was an easy way to manage without slow ROM-tables (however regular registers also simplified compilers). Pure logic implemented CPU (PLIC...) had been a "better" name than RISC :). Henrik Kjersén 31 jan 2006
-
[edit] The GameBoy
I think it's worth noting that the Z80 in the GameBoy was rather different. Most notably, it didn't have the IX or IY registers (no DD or FD instructions). It also had instructions for HL incrementing ("LD (HLI), A", "LD A, (HLD)") which were extremely useful. Otherwise, it had a number of "optimisation instructions" ("LD A, (0xFF00 + XXh") including some of the CB instructions being moved into the basic instruction set. -- Michael Abbott
- Doesn't the GameBoy also have a multiply instruction? Andy Janata 14:36, 9 October 2005 (UTC)
- No, it didn't. I vaguely remembered having to write a multiply routine for a project I worked on and checked it against http://www.devrs.com/gb/files/opcodes.html just to make sure. Michael Abbott 16:43, 9 October 2005 (UTC)
- I would think that the Gameboy has iy, and ix (unless its a different product number; z80 has several different versions) but the OS rather doesn't use it. For example, the TI-OS does not use IX under normal circumstances on the TI-83 plus, but you can still use it.
-
- Game Boy doesn't have an operating system, only a simple boot ROM that checks for the Nintendo logo in the cartridge. It lacks the IX, IY, I, R, AF', BC', DE' and HL' registers, but adds some instructions such as using a 16-bit register as a pointer and then incrementing or decrementing it, LD r,(FF00+nn) and LD r,(FF00+c) (and the matching store operations), and with Game Boy Color, the ability to switch to double-speed mode via the STOP instruction.
BTW, the correct title is Game Boy, with a space. 65.95.157.80 08:14, 29 September 2006 (UTC)
[edit] Clarify
What does "too minicomputer-oriented" mean? I tried to get this to say "too complex for embedded controllers" but someone thinks this phrase explains the failure of the chip. I'd appreciate a citation or some reference. --Wtshymanski 03:14, 1 April 2006 (UTC)
- It means (1) User and System modes, (2) Direct multiprocessor support, (3) On-chip MMU, (4) On chip instruction and data cache, and more - all fairly typical mini computer features. At the time, most designers of embedded systems came from electronics, and designed their systems, from the ground up, without using any RTOS or similar. They wanted simple and predictable* chips that could easily be learned in detail, not minicomputers on a chip (like 286/386 etc). Many engineers also work this way today, and that is one of the reasons why old designs like Z80, PIC, 8051, 65816 etc are still selling. --HenkeB 21:55, 1 April 2006 (UTC)
- (*) Regarding EXACT instruction timing, among many things
-
- Neat. Could you summarize and put that into the article? If only there were Wikifootnotes in the articles. --Wtshymanski 21:52, 19 April 2006 (UTC)
All the stuff about what the company did after the Z80 should go into the ZiLOG article. --Wtshymanski 20:16, 1 April 2006 (UTC)
- Z180 and eZ80 are compatibles, so they should be there. A short remark on Z8000/Z80000 in the introduction is also in order. Please note that the Zilog Z8 is not mentioned anywhere ;-) --HenkeB 21:55, 1 April 2006 (UTC)
[edit] 8085 ripoff?
I learned back in school that the Z80 was created after some internal arguments in Intel, and that quite a few engineers went over to Zilog, who created the Z80 at record speed, this being binary compatible with the old 8085 apart from a new instructions. Is this right?
- The Z-80 was binary compatible with the 8080, not the 8085. The 8085 was Intel's answer to the Z-80: it had some electrical improvements (mainly being 5V-only, instead of requiring three supplies), and a few other minor differences, but it did not have the Z-80's major architectural advances. There are some opcode conflicts between the 8085 and Z-80, while there are none between the 8080 and Z-80. Nearly all 8080 code runs correctly on the Z-80; code that was written for the 8085's extensions over the 8080 will not run correctly on the Z-80.
- The Z-80 was created after several Intel engineers left; it is not known how much of the Z-80 was lifted directly from the 8080, if any. Jay Maynard 23:19, 20 May 2006 (UTC)
[edit] Nonsensical caption
The caption of the first picture says, "One of the first Z80 microprocessors manufactured; the date stamp says well before July 1976." What does that mean? -- Kjkolb 07:50, 4 July 2006 (UTC)
- The date stamp on that Z80 was from before July 1976. The wording isn't great, though. 7623 probably means "1976, week 23", which should be June... --StuartBrady (Talk) 10:45, 4 July 2006 (UTC)
[edit] Arcade games
Many many moons ago, I worked at Chuck E. Cheese as a video game repair technician. Several games we had used the Z80 as their CPU. Unfortunately, as this was in the 1993-1995 timeframe, I don't remember WHAT games they were now or even which manufacturer made the games. I do recall having to order and swap out a Z80 at least once, and we definitely had them in at least 2 games. Not putting this in the article since obviously my vague memory isn't encyclopedic... but someone more determined than I may want to run down the names of those games so as to update this article with info on the use of Z80 in arcade games. Murple 06:30, 31 July 2006 (UTC) —The preceding unsigned comment was added by Murple (talk • contribs) .
- The MAME source will give tell you many games which used Z80s, either as their main processor or as secondary sound processors or the like. Cheers --Pak21 08:10, 31 July 2006 (UTC)
[edit] Bulk copy
Didn't the Z80 have a bunch of bulk copy operations? To my inexperienced mind, that was the thing that marked the Z80 out from other processors of that era. eg LDIR - load from (DE) into (HL), increment both DE and HL, decrement BC, repeat until BC is zero, or something like that, in a single operation. Or was that some kind of sneaky assembly macro?
Chris Thornett 17:09, 24 August 2006 (UTC)
- No, that's an honest to goodness Z80 instruction (0xed 0xb0). There was also a decrementing version (LDDR) and repeated versions of IN, OUT and CP. Cheers --Pak21 18:13, 24 August 2006 (UTC)
[edit] Undocumented I/O
It would be useful to know if any computer or device ever utilized this. I would like to know, because addressing hardware on the ti-83 flash family is rather annoying with the out(XX),a instruction...
- ZX81 did, for instance.
- Annoying, how? (I do not know the TI calculators in detail).
- (OUT (nn),A has A on A15..A8 while nn is on A7..A0, btw)
- /HenkeB 16:30, 17 September 2006 (UTC)
[edit] Different Product Numbers
It should be noted here that there are different product numbers for the z80 (check Zilog's site). Many different versions of the z80 function a bit differently.
-
- Product numbers differ for Z80 CPU / Z80 SIO / Z80 PIO / Z80 CPU with intergrated peripherals etc., and also among speed grades, package versions (DIL, PLCC, LQFP, etc), and so on. The core Z80 is precisely the same however (except for the newer Z180 and eZ80, which are different but still Z80-compatible). /HenkeB 01:28, 9 September 2006 (UTC)
[edit] Other Undocumented Instructions
In the section Undocumented Instructions: "There are several other undocumented instructions as well." Shouldn't this have some source or a list of these instructions? Or does it just mean there are other variations of the ones already mentioned (eg loading into the upper half of IY)? 65.95.157.80 08:19, 29 September 2006 (UTC)
- Sure, this remark was intended to imply that we had not forgot about these instructions, just left them out for the moment. If (when I check WP the next time) someone hasn't added a description of the few useful ones, at least, together with a little discussion on chip versions and manufacturers, I may consider doing it myself. /HenkeB 16:40, 1 October 2006 (UTC)
[edit] COMP JU+TER as Example of U880 usages
The COMP JU+TER is based on the U883 which is a variant of the Zilog_Z8 microcontroller with integrated BASIC, not the Z80. —The preceding unsigned comment was added by 212.23.126.1 (talk) 19:52, 28 March 2007 (UTC).