Reply to post: Re: What we need

ZX Spectrum reboot latest: Some Vega+s arrive, Sky pulls plug, Clive drops ball

Peter Gathercole Silver badge

Re: What we need

The 6502 and Z80 clock issue is really a precursor to the great RISC vs. CISC debate.

Generally, the 6502 would execute each instruction in about 2 clock cycles, although there were a few that only needed one. The Z80 required between 4 and 13 clock cycles per instruction depending on what the instruction was (this is from memory), so although it generally had a faster clock speed, and more sophisticated instructions, for many of the simpler operations that these processors typically ran, the 2MHz 6502 in the BBC performed tasks faster than the 3.75 MHz in a Spectrum.

The memory access was also more simple for 6502, which enabled it to work with slower memory than the Z80, mainly because memory and CPU clock speeds were linked together.

For complex workloads, the Z80 could run rings around a 6502, but in order to do that, you would need to have work that needed 16 bit registers, and used the complex instructions to their maximum benefit.

The Z80 was more memory efficient (so long as you used all of the instructions) although clever use of the indexed addressing modes of the 6502 could save memory, and allowed you to use zero page memory almost as registers on a 6502, negating some of the benefit of the Z80's more generous register set. The Z80 also had the basic support for bank-switched memory and port driven I/O, neither of which the 6502 had.

It's also worth remembering that processors of this age executed instructions strictly in the sequence they were written, with no overlapping or super-scalar execution, and all memory read and writes went strictly to the RAM, no caching or pre-fetich of instructions or data.

So the Z80 was a more sophisticated processor, but not necessarily a faster one than the 6502.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019