Note: Thanks to Ben Cressey for bringing this topic to my attention.
The Praxis Z-machine tester contains code that looks like this:
@loadw addr (-1) -> val;
What it is attempting to test is clear, but I’m not sure that @loadw is supposed to interpret the index argument as signed. The spec, in §15, explicitly lists some operations as signed, @loadw not among them. It seems to me that these would be the exceptions proving the general rule of unsigned.
Most interpreters I’ve tested (fizmo, rezrov, zoom, nitfol, zeal, xzip, zmpp, and zig) do not pass this test. Frotz passes because, even though it uses unsigned arithmetic in z_loadw(), it stores the result in a 16-bit object, yielding the Praxix-expected value. ZLR and Parchment also pass.
I suspect this isn’t a common construct, since nobody has appeared to complain even though interpreters differ; but I’m wondering if anybody has insight into which is correct? An Infocom story using an index > $7fff would be nice…