3 ms·
> a handful of instructions are needed for turing completeness and you can ignore most of the rest. This is an idea that assumes spherical instructions in the
by pizza234 5y ago
> a handful of instructions are needed for turing completeness and you can ignore most of the rest.
This is an idea that assumes spherical instructions in the void, in other words, just passively staring at a listing (or at most, writing a hello world).
On a simplistic ISA like the 65xx, it's very complex to handle arithmetic as simple as a division or multiplication.
Implementing them is hard, and reading them is hard, too ("what is this code doing"?). There are multiple implementations that one has to know in either case, otherwise it takes a considerable time especially when writing them.
Anything beyond a "hello world" is definitely complicated in ASM.
- foxfluff 5y agoWell, doing something that the platform or language doesn't help you with or isn't designed for can be hard (or impossible), but I think that is true of literally any and every system. Writing a bootloader or memory allocator or atomically flipping bits in a peripheral register would be hard in Python, but that doesn't imply Python is hard in general. Making performant and carefully timed code (for example, bitbanging a protocol) in CircuitPython can be hard. It's not the language, it's the thing you're trying to do with it. Doing floating point math in assembly on an 8-bit AVR is hard but that doesn't make assembly in general hard, it just makes the thing that isn't particularly well suited for the AVR platform hard on that platform. On a similar note, assembly can make many things easy that are complicated to do right in C due to implementation defined or undefined behavior. Or sometimes simply due to lack of suitable operators or standard library functions (e.g. popcnt). I'm trying to point out the difference between the thing you do and the thing you do it with. I still hold that assembly is easy, but you can find things that are hard to do with it. Nailing a plank is easy, building a plane out of nails and planks is not. I have seen plenty of nontrivial assembly programs that by and far rely on a small set of simple core instructions and don't need to go to great lengths to work around platform limitations. They do things that assembly is well suited for, and then use another language for things assembly isn't well suited for.