4 ms·
I recommend the 6502[1] if you're just starting. What you learn applies almost everywhere, and it's very much a what-you-write-is-what-happens sort of processor
by Posibyte 8y ago
I recommend the 6502[1] if you're just starting. What you learn applies almost everywhere, and it's very much a what-you-write-is-what-happens sort of processor. No branch prediction, no caches, no fancy features. Its op-set is very small and highly expressive. They still make them, in fact.
That said, whether you choose to start with it or RISC-V, from personal experience SiFive's implementations are phenomenal. I used one of their free-implementations, and I was blown away by how easy it was to use their automated tools to build a core exactly the way I wanted. Not as easy as generating a NIOS core, but much more capable. With an Artix-7, I had a very capable low-range processor in about an hour.
[1]: https://skilldrick.github.io/easy6502/ https://skilldrick.github.io/easy6502/
- masklinn 8y agoIf you just want to dip your hand in, chip8 is also a good starting point (if even less useful than 6502): where 6502 has about 80 actual opcodes acrosss ~50 mnemonics (https://en.wikipedia.org/wiki/MOS_Technology_6502#Assembly_language_instructions https://en.wikipedia.org/wiki/MOS_Technology_6502#Assembly_l...) chip8 has 35 opcodes across 19 mnemonics (ADD, AND, CALL, CLS, DRW, JP, LD, OR, RET, RND, SE, SHL, SHR, SKNP, SKP, SNE, SUB, SUBN, XOR).
- monocasa 8y agoHaving taught asm to people as their first language, I'd go with something like an MSP430. Since a 6502's registers are only half the pointer width, it really makes pointer manipulation more of a pain in the ass than it needs to be. That really obfuscates quite a.few.of the concepts that you're trying to learn by writing asm for a simple core.