For some reason, when printing a string that is longer than 32 characters (source text), Inform 6 generates a string constant and @print_paddr opcode instead of just doing a straight @print. This uses a lot of extra space and there doesn’t seem to be an obvious reason for it. It was added in Inform 6.14; I assume not without reason. Is there perhaps some unusual problem with very long instructions or routines?
It’s mentioned in the I6 tech manual.
1 Like
If I remember correctly, the zcode holding area isn’t staticly sized in the latest code on GitHub. Does that mean this workaround is no longer needed?
There’s a per-routine buffer and an all-zcode buffer. I’ve fixed up the latter but not the former.
However, this isn’t the limit that’s described in the tech manual. I’m not exactly sure what that limit is, in fact. It’s probably an offset being stored in two bytes somewhere.
For reference, this is from TM chapter 13:
Changes made between v6.13 and v6.14:
"Parker's disease": In very large games only, backpatch errors being
caused because the Z-code area of the Z-machine had overflowed
past the size where the compiler could backpatch it (this tended
to happen only if large amounts of text were printed by Inform code
rather than being property values). The Inform code generator now
automatically writes any string of text longer than 32 characters
into the static strings area: designers shouldn't notice any difference
in behaviour of the "print" or "print_ret" statements.