4 ms·
They don't transform memory, they load memory into registers, transform the registers and (maybe) store the registers values back into the memory. The differenc
by konjin 6y ago
They don't transform memory, they load memory into registers, transform the registers and (maybe) store the registers values back into the memory. The difference is profound and until you code in assembly you have no idea why (or that) string operations are so expensive.
- koolba 6y agoAgain, the point is not to have an real language for any efficient real world usage. The point is to have a simplified language that represents a series of commands operating on a bank of memory. Like this: SET 1 100 # Set memory[1] = 100 SET 2 500 # Set memory[2] = 500 ADD 3 1 2 # Set memory[3] = memory[1] + memory[2] It's easy to explain what each individual step is meant to do and you can build up to more complicated instructions. It allows children to see the persistent effects of running the program, mutating the state of the memory, eventually introducing the instruction counter itself as a state variable.
- konjin 6y ago>eventually introducing the instruction counter itself as a state variable. If you're going to be talking about the IP register than you need to talk about the IR register. So we should avoid talking about registers by talking about registers? You're not selling this registerless assembly very well.
- koolba 6y agoIt doesn't have to be a register. Just a labeled piece of memory. It works great with children and you don't even need a computer. You can do it all on a pen and paper.