2 ms·
If every instruction is subleq <a> <b> [<c>] why does the mnemonic "subleq" have to appear? All it is saying is "do the one and only instruction on operands
by kazinator 3y ago
If every instruction is
subleq <a> <b> [<c>]
why does the mnemonic "subleq" have to appear? All it is saying is "do the one and only instruction on operands A, B and possibly C".
Thus:
<a> <b> [<c>]
would be a better assembly language format.
- schemescape 3y agoYou are correct that it’s strictly unnecessary as long as there’s some way to detect when the third address was omitted, e.g. by requiring a newline. I left the requirement in to make it look more like typical assembly language and also as a reminder of what it’s doing (and making the distinction between “.data” a little more obvious). I also thought the tedium of typing “subleq” fit nicely into the theme of the game. So I guess it was more of an aesthetic decision.