Ask HN: Which processor to pick for learning assembly?
4 shivajikobardan 4 8/8/2025, 9:32:49 AM
I am doing a course on Computer Organization and Architecture from YT. And following John P Hayes's textbook. I think programming things could help me up.
PS: I saw that there are courses on udemy regarding CPU design. And I am planning to take that course as well.
To aid in learning, you can always write in C and then output in assembly. Typically you would turn off optimization. The optimizer will often scramble the results to make it better but harder to read.
Have you thought about the class NAND to Tetris? It builds a tetris game but starts and the gate level.
I like the CPUlator as a platform. It lets you step through the program one instruction at a time and observe all of the registers and memory locations.
https://cpulator.01xz.net/?sys=arm
This set of lessons is a good starting point:
https://thinkingeek.com/series/arm-assembler-raspberry-pi/
My course repository has several example programs with explanatory comments:
https://github.com/dansmyers/ComputerOrganizationAndArchitec...
If you use whatever your computer can execute, it's fun to make actual, real programs for your operating system in assembly. That means likely, x86-64. (Even if you are on ARM, you computer will emulate x86-64 just fine, most likely.)
Or use ARM, if you are on a not-old Mac or whatever.
The simplest architecture which is still 32 bit and has real hardware, is probably MIPS.
If you want to feel what it's like to control a complete system from end-to-end, you could dive into embedded platforms (AVR/ARM), or emulators of classic machines like the Commodore Amiga with the m68k line of processors. It has a sweet-spot in my heart because on the one hand it's modern enough to have great graphics, sound and even network capability, on the other hand it's simple enough to completely understand.
Either way you choose, you'll have great fun.