3 ms·
Is the 6502 the peak of hobbyists writing assembly? I think it fills a fantastic niche of being well-documented while also not being completely terrible to writ
by caslon 6y ago
Is the 6502 the peak of hobbyists writing assembly? I think it fills a fantastic niche of being well-documented while also not being completely terrible to write by hand.
- gfody 6y agothere's something incredibly comfortable about being able to view the instruction set along with affected flags and supported address modes in its entirety on something about the size of an index card
- caslon 6y agoThe elegance of that time is something unfortunately missing from modern software.
- the_only_law 6y agoI don't even know hoe x86 experts got there. I'm constantly learning about all sorts of strange instruction that look like random strings and perform seemingly odd calculations.
- caslon 6y agoIntel has kept their ISAs roughly-consistent with each other since 1972. Of course, in doing this, they have created a behemoth. You can't make something smaller when your goal is eternal (in)consistency.
- zozbot234 6y agoRISC-V has its own ISA summary card, AIUI. Plot twist: there are no address modes (since it's a load-store architecture, all loads and stores are explicit) and no flags to keep track of (since compare-and-branch instructions are used instead of flags, to make higher-performance implementations easier).
- zimpenfish 6y agoYou could probably get the entire (original, ARM1-3ish) ARM instruction set onto an index card with a little creative freedom. Possibly even a single side? edit: Forgot to explicitly clarify that it was ARM
- ConcernedCoder 6y ago6502 asm is incredibly easy to work with, the instruction set is intuitive as well as the memory layout, registers, etc...
- caslon 6y agoAbsolutely agree! I love writing it, myself.
- userbinator 6y agoPersonally I prefer the Z80 --- it has the advantage of many more registers, addressing modes more suited to HLLs, and a stack that is not limited to a fixed 256-byte portion of the address space. Of course it also needs more than twice the number of transistors and thus die area, which may be why the 6502 is still so widespread.
- cmrdporcupine 6y agoZ80 instruction set is nicer, but the Z80 was also half the speed per clock cycle, less responsive to interrupts, and more expensive. Hence why the 6502 got slapped in a lot more home computers and the like. Actually the 6502 designers really intended it more for control systems / embedded. The 6809 is the best of the bunch tho.
- dboreham 6y agoAlthough Z80 has lower IPC, it had a roughly 2x clock speed so performance was about the same Z80 slightly faster for most applications. It would be rare however for there to be a direct "bake off" between the two CPUs -- any given design organization was either an 8080/Z80 shop or a 6800/6502/6809 shop. There weren't sufficiently great differences in price/performance between the two to make it worthwhile changing.
- zimpenfish 6y agoYou could get a BBC Model B (6502 2MHz), add the 3MHz 6502 board, add the 6MHz Z80B board, and do a "bake off" between all three (obvs. scaling for clock speed.) Then add the 8MHz ARM1 board and watch it smoke the rest into dust, I suppose.
- JdeBP 6y agoConsidering that said hobbyists make things like the KimKlone to improve upon the 6502, possibly it is not. (-: * https://laughtonelectronics.com/Arcana/KimKlone/Kimklone_short_summary.html https://laughtonelectronics.com/Arcana/KimKlone/Kimklone_sho... (https://news.ycombinator.com/item?id=16564257 https://news.ycombinator.com/item?id=16564257 https://news.ycombinator.com/item?id=3070169 https://news.ycombinator.com/item?id=3070169 https://news.ycombinator.com/item?id=26292235 https://news.ycombinator.com/item?id=26292235) I enjoyed the 6502, but I enjoyed the 6809 more.
- wvenable 6y agoI just spent the day writing 6502 assembly for my homebrew computer. I finished writing an in-place command line parser for a ROM monitor. The 6502 has a lot going for it -- very small instruction set, simple instruction timing, etc. But it's also a challenge because it's only got 3 registers, a fixed stack location, the zeropage, and some other strange properties. It's taken a little while to figure out how to use it effectively.
- davidgould 6y agoIf you want a more modern microcontroller, but in the spirit of the 6502, take a look at the STM8.
- wiz21c 6y agoGive this a try : https://8bitworkshop.com/ https://8bitworkshop.com/
- protomyth 6y agoI do admit, given a choice I would rather program the 6809. I loved the 6502 and it was the first processor I learned assembly, but I still think the 6809 is better.
- WorldMaker 6y agoThe 6502 was also in the right place at the right time in the wave of the great "homebrew computer club" era. There were so many DIY kits built around 6502 and 6502 clones. Some of the earliest mass produced (and mass consumed) "home computers" were all built around 6502 and 6502 clones. Not to mention how large a number of early game consoles were also built on those chips or their clones/offspring. At least a little of hobbyists writing assembly in 6502 comes from nostalgia for early Apple, early Nintendo, early Commodore, etc. Also, yeah as someone who's undergrad included a MOS 6502 "micro-controller" lab and Motorola 68k "microprocessor" lab courses, I can tell you from hands on experience that the 6502 really was in a fantastic place for writing clean, easy to debug assembly. That was a big time crunch factor in dealing with breadboarded machines where debugging the hardware was an equal or greater challenge. Given the choice between the two assembly languages I know which one I'd pick up again.