When parsing Z-code assembly, for the @jump opcode, parse the argument with parse_label() instead of parse_operand().
This brings @jump in line with the jump statement. It correctly supports forward and backward jumps; it throws the correct error when jumping to a nonexistent label.
(Apparently the @jump opcode was just never tested at all for Z-code assembly. Everybody's been using the statement form, which produces the same output, only without the bugs.)
When parsing Z-code assembly, for the
@jump
opcode, parse the argument with parse_label() instead of parse_operand().This brings
@jump
in line with thejump
statement. It correctly supports forward and backward jumps; it throws the correct error when jumping to a nonexistent label.(Apparently the
@jump
opcode was just never tested at all for Z-code assembly. Everybody's been using the statement form, which produces the same output, only without the bugs.)This entirely fixes https://github.com/DavidKinder/Inform6/issues/200 as far as I know.
Test cases: https://github.com/erkyrath/Inform6-Testing/blob/jump-opcode/src/jumpopcodetest.inf , https://github.com/erkyrath/Inform6-Testing/blob/jump-opcode/src/jumpbadtest.inf .