4 ms·
> why the C programming language is the way it is. I’m curious specifically why you think this is. The 6502 with its poor register set and special purpose addr
by tellak 7y ago
> why the C programming language is the way it is.
I’m curious specifically why you think this is. The 6502 with its poor register set and special purpose addressing mode seems to make it a relatively terrible/challenging C target.
- danmaz74 7y agoNot OP, but I learned assembly on the 6502, and its simplicity make it easy to create a mental model of the internals of a CPU - these relate very well with a low level language like c, even if today's CPUs are so much more advanced (and difficult to study).
- nategri 7y agoOP here---you nailed it. Pointers and pointers-to-pointers can seem pretty abstract unless you work one level closer to the metal for a bit.
- duskwuff 7y agoPerhaps a better target might be the 68000, then? Still a relatively simple architecture, but one that more closely resembles a modern system -- multiple general-purpose registers, and ones which can be used as pointers without weird workarounds. (The 8-bit data / 16-bit address nature of the 6502 makes pointers complicated.)
- danmaz74 7y agoCould be. Later I also worked with machine code on the 68K and it stuck to me less than the 6502, but it might just be because I felt that more like a chore than when I was dabbling with the 6502 (which I learned when I was just a kid).