nonanon wrote:
So I take it the best CPU to learn assembly programming is the 6502, based on the elegance everybody mentions here... Although the main reason why I want to learn assembly programming in the first place is to be able to program in x86 and ARM assembly. So do you think the 6502 would make a good stepping stone to learn those languages? Or should I start with one of those processors first?
I'd suggest that if you just wanted to learn about assembly language then choose ARM. It's a very simple RISC instruction set that doesn't take long to learn. The best way to get started is to get an ARM board running linux (like a Raspberry Pi), then you can just install the GNU build tools and start programming right away. You can do this on a PC with QEMU too, but it's easier to not have to cross compile. This has the advantage of being something that you could use for work and it leads on to more advanced concepts like operating systems, cache's, memory management and a lot of stuff that happened since the 6502.
If you are more interested in learning about how computers work at the hardware level then there is probably nothing better than the 6502. You could build your own system on a breadboard, it's not that hard. You'll need an EPROM programmer (or some other way of getting started), but otherwise you can do it quite cheaply. Or you could get a WDC board, that would get you up and going quickly.
Most of the difficulty in getting started is setting up an environment which doesn't get in your way. The 6502 is a more pure way to learn because it's simpler and needs less support. For a more complex processor the possibilities are endless, but you will have more work setting up a toolchain and development system. I guess another consideration is the support you can get from 6502.org, if you get stuck there are plenty of people here that always help out and are happy to discuss any problems you may come across. Maybe spend some time looking through
Garth's primer, it may get you hooked on going down the 6502 path.