In trying to clarify confusion in the Z-Machine Standard, I’ve noticed that the information for encoding instructions contains the following:
Each instruction has a form (long, short, extended or variable) and an operand count (0OP, 1OP, 2OP or VAR)…
In variable form, if bit 5 is 0 then the count is 2OP; if it is 1, then the count is VAR…
The operands are given next. Operand counts of 0OP, 1OP or 2OP require 0, 1 or 2 operands to be given, respectively. If the count is VAR, there must be as many operands as there were types other than ‘omitted’.
This seems to me to say that 2OP opcodes encoded in variable form can still only have two operands, which isn’t true. Am I misreading this? Did I miss something that makes it make sense elsewhere?