Updating the Z-Machine Standard Documents

An error: The definition for the @make_menu opcode currently states:

This is technically true (barely), but so incomplete and misleading as to be functionally incorrect. The term “ZSCII string” is not formally defined by the Standard, but the usage of “ZSCII” and “string” in §3 would imply that it means “a text string encoded into ZSCII in the usual way”. This would imply something like (in ZAP syntax)

MENUTABLE::
    .WORD 3  ; length header
    .WORD STR?1
    .WORD STR?2
    .WORD STR?3

.GSTR STR?1,"Menu"
.GSTR STR?2,"Option 1"
.GSTR STR?3,"Option 2"

Actually, @make_menu takes a word table of character tables, where the entries in the character tables are single bytes containing ZSCII character codes:

MENUTABLE::
    .WORD 3   ; length header
    .WORD STR?1
    .WORD STR?2
    .WORD STR?3

STR?1::
    .BYTE 4   ; length header
    .BYTE 77  ; M
    .BYTE 101 ; e
    .BYTE 110 ; n
    .BYTE 117 ; u

...and so on

This behavior is documented in the Infocom YZIP documentation and is in fact how the opcode behaves in (e.g.) Frotz.

I might suggest spelling it out explicitly (since the Standard is already a bit vague on what “table” means in any given context):

4 Likes