5 ms·
The 6502 was a better chip (designed with hindsight on the 6800), and also cheaper. Z80 could run 8080 code.
by angiosperm 3y ago
The 6502 was a better chip (designed with hindsight on the 6800), and also cheaper. Z80 could run 8080 code.
- kjs3 3y agoJust because it came second, doesn't mean it's better. It was cheaper, and you can see where they cut corners to be cheaper. For me, if nothing else, the 16-bit stack and index registers in the 6800 make it hands down a better chip to program. But the 6502 was cheaper, sure, and some people probably like to spend all day thinking about what stuff to cram into the first 256 bytes to be performant.
- systems_glitch 3y agoIf I had to pick one over the other to write serious software in forever, it'd definitely be the 6800. Remember, you can also spend all day exploiting zero page mode in the 6800, but you'll never be able to move the 6502's stack :P
- angiosperm 3y agoThe "zero-page", the low 256 bytes, amounted to a big register bank; compilers for 6502 used it that way. The hardware stack was for return addresses only, and was plenty; a zero-page pair pointed to the stack for arguments and locals. The designer of the ARM noted that her programs ran faster on 6502 than when ported to early 8086, largely because the latter was relatively so inefficient.
- kjs3 3y ago6502 fanbois like to pretended the zero page was registers because they had no choice and every since have tried to convince people that a weakness is a virtue. Better architectures don't have to pretend. And no one was talking about the 8086; most people who try to drag in an irrelevant processor to 'prove' 6502 superiority go 'but Z80!', so cudos for some originality. But it is now as it has always been: when you call someones pet processor ugly, you'll get all the specious arguments you can stomach.
- angiosperm 3y agoI never programmed 6502. But Sophie Wilson, who designed the ARM, and coded Acorn's BASIC interpreter, and shipped Acorns that could operate different CPUs on the same bus running her interpreter (ported), was in a better position to know than anybody else I know of. It is easy to confuse a more convenient programming model with more efficient operation.
- kjs3 3y agoI never programmed 6502. I did. I'm not cherry picking things I found on Google to try and be right.
- cmrdporcupine 3y agoThe # of clock cycles to access zero page on 6502 is still higher than from the register set. I forget the exact amount, but it's certainly not another register, from a pure efficiency POV. If I recall it's at least one more cycle. Adds up quite a bit if you're doing things like shuffling in and out of the (single) accumulator. The TMS9900 took this further, and had no onboard registers (other than PC & status register). Everything was in RAM. That model only made sense until RAM became slower than the bus speed (late 80s). The zero page in the 6800 and 6502 not being relocatable also sucked. Something fixed in the 6809 and 65816 respectively. I suspect the lessons Sophie Wilson learned from the 6502 were... cycle efficiency and minimalism. The 6502 was super responsive to interrupts precisely because it was so sparse on features.
- actionfromafar 3y agoThe zero page was faster than regular RAM access though, it's gotta count for something.
- angiosperm 3y agoMemory was one cycle, zero-page or not. Indirect through zero page was 3 cycles after the instruction fetch, the first two to collect the address, the third to use it. The other chips with 16-bit index registers should have had a huge advantage, but they spent lots of cycles doing nothing visible from the outside.
- deleted 3y ago[deleted]
- systems_glitch 3y agoRemember that the 6502 and its related chipset was not designed to compete with the 8080 or 6800 for general computer applications, but rather with the Intel 4004 for cheap, low-parts-count embedded applications! Keeping that in mind, a lot of the 6502 design decisions make a lot more sense. That folks turned out complex, feature-complete operating systems several times on 6502 is as impressive as those things being done on e.g. the DEC PDP-8, IMO. Doubly so when you consider that the 6502 hackers were often just that, hackers and hobbyists without an industrial-grade budget.
- dboreham 3y agoThis isn't true. The 4004 was obsolete by the time the 6502 was designed and nobody really thought of the 4004 as a CPU -- it rose to prominence years later as part of the victors (Intel) getting to write history. The 6502 was explicitly designed to compete with the 6800, so much so that it was pin compatible until legal action resulted in it being changed.
- systems_glitch 3y agoI'm trying to dig up the Chuck Peddle interview where he talks about targeting the embedded 4004 and friends market, I'll post it when I finally find it. The interview mentions achieving functional parity with the MCS-4 chip family as the reason for e.g. the 6530 RRIOT. The 4004 was old by then, but not obsolete. It and the 4040 were still being integrated into embedded systems where cost was a major factor through the late 70s.
- systems_glitch 3y agoFound it! Bill Mensch, not Chuck Peddle, and it's an IEEE Spectrum interview: https://spectrum.ieee.org/q-a-with-co-creator-of-the-6502-processor https://spectrum.ieee.org/q-a-with-co-creator-of-the-6502-pr...
- kens 3y agoInterestingly, the 8080 and 6800 were also designed more for embedded applications than for general-purpose computing. As late as 1981, Intel was focused on the various products that microprocessors could be designed into, such as clothes dryers and sprinkler systems. It's hard to imagine from the modern perspective, but the selection of the 8088 for the IBM PC was just another application. Intel viewed the iAPX 432 as their processor for real computing. Take a look at the cover of Intel's 1981 annual report which lists some of the 10,000 products that used microprocessors, putting personal computers down on the list between cameras and solar energy system control: https://www.intel.com/content/dam/doc/report/history-1981-annual-report.pdf https://www.intel.com/content/dam/doc/report/history-1981-an...