3 ms·
Ah issue is that some (most?) architectures can't do math without messing with registers such as an accumulator, carry flag, negative flag, etc. While it looks
by Drakim 4y ago
Ah issue is that some (most?) architectures can't do math without messing with registers such as an accumulator, carry flag, negative flag, etc. While it looks convenient, I'm not sure I'd feel very confident about what happens with the CPU state using higher level syntax like that (especially if you want something more than a trivial addition)
- vidarh 4y agoThe thing is, it's not "higher level syntax" unless you make it higher level. It's the semantics that matters, and as stated in that case it was entirely deterministic which assembly instructions would get emitted. But of course that puts pretty hard limits on the compiler (e.g. no optimizations), and you end up doing low level programming just with a different syntax. That's to say, it looks convenient, and it was nice as a way of bootstrapping a simple compiler, but you're right to question whether the convenience is worth it.