Handling of packed ZSCII values 1-3 when "shifted" to A1 or A2?

ZMS 1.0 section 3.3 says:

In Versions 3 and later, Z-characters 1, 2 and 3 represent abbreviations, sometimes also called
'synonyms' (for traditional reasons): the next Z-character indicates which abbreviation string to
print. If z is the first Z-character (1, 2 or 3) and x the subsequent one, then the interpreter must
look up entry 32(z-1)+x in the abbreviations table and print the string at that word address. In
Version 2, Z-character 1 has this effect (but 2 and 3 do not, so there are only 32 abbreviations).

I am assuming that this is the defined behavior when alphabet A0 is selected. Is there a definition of what happens if the alphabet has been shifted to A1 or A2?

Also, since only 64 abbreviations are allowed by Inform 6, would a 3 code here mean that the selected range was illegal?

It doesn’t matter which alphabet is selected. This check is done before checking any alphabet tables.

(Any particular reason why you’re reading version 1.0 of the spec when v1.1 is the current one?)

Because that’s the only PDF version I’ve found (version 1.0 w/updates through Sep 04 1997 and ZMS 1.1 draft 7 added as an appendix).

Is ZMS 1.1 available as a PDF anywhere? (I’ve only come across the HTML version of it at The Z-Machine Standards Document: Contents .)

I have a pdf that I started a while back if you’re, or anyone else, is interested. There’s a pdf and an odt-file. It probably could use some profreading.

Z-machine standards document ver 1.1

(The document is created by copying from the HTML-version and applying formatying. The actual text should be correct.)

Thank you! Do you mind if I add a link to the “list of Inform 6 documentation” post?

(And another question: Do you plan to submit it to the IF Archive?)

Not at all.

I don’t know how that works but if it’s fit for IF Archive I have no problem submitting it there.

Is this what drives the “wastefulness” that you cited at Z-machine text encoding - wasteful? ?

Yes. These codes could have been used for something else when alphabet A1 or A2 are selected. Wasting three codes in A1 and three codes in A2 means a lot of waste.

Coming back to this question, I don’t think I ever discovered what happens in Inform 6 if the abbreviation “bank” code of 2 were to be used. That would imply an abbreviation index number from 64 to 95, which is more than the number of allowed abbreviations. (I think.)

Is this just something that is avoided by the I6 compiler? Is there any reason that the maximum number of abbreviations in Inform 6 couldn’t be expanded to the full number supported by the Z-machine?

Also, FYI to those finding this thread in the future, heasm66’s PDF for ZMS 1.1 has been uploaded to the IF Archive. It’s also linked (to the github source) on the sticky post of I6 resources on the Inform 6 forum here.

1 Like

This was added in 6.35. You can set $MAX_ABBREVS to 96, which automatically sets $MAX_DYNAMIC_STRINGS to 0. Or vice versa.

Great! Thank you for the clarification, zarf.

And if I’m understanding correctly, pre-6.35 that last bank was reserved for use to store dynamic strings (aka “printing-variables” as described on DM4 p. 30, online section 1.11 DM4 §1: Routines)?


Now you can decide how to divide up the 96 entries between abbreviations and dynamic strings.