From 00b86ad29bc2e04d8b185c9be47dff6cd1d34894 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 12:06:27 +0000 Subject: [PATCH 01/10] ch04: fix short-circuit constant-folding description for || The source (expressp.c) folds 'X || ' to 1 whenever X is any non-zero compile-time constant (check: o1.value != 0), not only when X is specifically the literal 1. Update the description to match. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part1-language/ch04-expressions-and-operators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/part1-language/ch04-expressions-and-operators.md b/guide/part1-language/ch04-expressions-and-operators.md index 48c6fdc..5def94d 100644 --- a/guide/part1-language/ch04-expressions-and-operators.md +++ b/guide/part1-language/ch04-expressions-and-operators.md @@ -50,8 +50,8 @@ a branch jumps past the right operand; for `||`, if the left operand is true, a branch jumps past the right operand. At the constant-folding level, the compiler also applies short-circuit -rules: `0 && ` folds to 0, and `1 || ` folds to 1, -without evaluating the right-hand expression. +rules: `0 && ` folds to 0, and any non-zero constant `|| +` folds to 1, without evaluating the right-hand expression. ## 4.2 Arithmetic Operators From 1bf0088f88f714e3da2c631dcb0f51da9c66c977 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 12:24:40 +0000 Subject: [PATCH 02/10] Fix ch07 limits: Glulx common property count and class VENEER constraints - Table row 682: Glulx 'Maximum common properties' corrected from 'INDIV_PROP_START - 1 (default 255)' to show both the property slot range (INDIV_PROP_START - 1 = 255) and the user-declarable count (INDIV_PROP_START - 3 = 253, as confirmed by the compiler error message in objects.c:352-353). - Table row 686: 'Maximum classes' corrected to show the hard limits enforced by VENEER_CONSTRAINT_ON_CLASSES_Z = 256 (Z-machine) and VENEER_CONSTRAINT_ON_CLASSES_G = 32768 (Glulx) in header.h:617-622 and objects.c:1877. The previous text incorrectly said classes were 'limited only by the maximum number of objects / memory'. - Section 7.4.1 Glulx property text: clarified that 253 properties are user-declarable (not all 255 slots), matching the compiler's check. No changes to ch08-arrays.md: all claims verified correct against arrays.c (five array types, 32767 Z-machine entry limit, 255 string array entry limit, buffer/table/string layout, WORDSIZE handling). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- .../ch07-objects-classes-inheritance.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guide/part1-language/ch07-objects-classes-inheritance.md b/guide/part1-language/ch07-objects-classes-inheritance.md index def9b4a..577423a 100644 --- a/guide/part1-language/ch07-objects-classes-inheritance.md +++ b/guide/part1-language/ch07-objects-classes-inheritance.md @@ -190,9 +190,10 @@ The number of common properties is limited: `Property`). The standard library declares 47 with `Property`, which together with `name` gives 48 user-visible common properties. - **Glulx**: Limit depends on the `INDIV_PROP_START` setting (default - 256), so by default common properties are numbered 1–255. In - practice the limit is much higher than the standard library - requires. + 256), so by default common property numbers run 1–255 (`INDIV_PROP_START - 1`), + of which `INDIV_PROP_START - 3` (default 253, including the built-in `name`) + are user-declarable. In practice the limit is much higher than the + standard library requires. A default value can be set: @@ -679,11 +680,11 @@ Restrictions on `private`: | Limit | Z-machine | Glulx | |---|---|---| | Maximum objects | 255 (v3); v4+ limited only by memory | Limited only by memory | -| Maximum common properties | 31 (v3, of which 29 are user-declarable), 63 (v4+, of which 61 are user-declarable) | `INDIV_PROP_START - 1` (default 255) | +| Maximum common properties | 31 (v3, of which 29 are user-declarable), 63 (v4+, of which 61 are user-declarable) | `INDIV_PROP_START - 1` (default 255), of which `INDIV_PROP_START - 3` (default 253) are user-declarable | | Maximum attributes | 32 (v3), 48 (v4+) | `NUM_ATTR_BYTES × 8` (default 56, max 312) | | Maximum data per common property | 8 bytes / 4 words (v3), 64 bytes / 32 words (v4+) | 32768 values per property | | Maximum data per individual property | 64 bytes / 32 words | 32768 values per property | -| Maximum classes | Limited only by the maximum number of objects (every class is itself an object and consumes an object-number slot, so on v3 the four built-in metaclasses plus all user classes share the 255-object cap) | Limited only by memory (every class is an object and consumes an object-number slot) | +| Maximum classes | Capped at 256 by the compiler (`VENEER_CONSTRAINT_ON_CLASSES_Z`), and additionally capped by the object limit (on v3, four built-in metaclasses plus all user classes share the 255-object cap) | Capped at 32768 by the compiler (`VENEER_CONSTRAINT_ON_CLASSES_G`); every class is an object and consumes an object-number slot | --- From 064910bc751e880b261dbd2ebce11e52e4bbeaeb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 23:57:30 +0000 Subject: [PATCH 03/10] fix(ch10): correct abbreviation limit documentation The guide claimed a 'hard limit of 96 abbreviations', which is technically the absolute ceiling but misleading: the default effective limit is 64 (from $MAX_ABBREVS defaulting to 64), and exceeding it gives an error suggesting 'Increase MAX_ABBREVS'. Only by raising $MAX_ABBREVS can the user reach 96. Also, $MAX_ABBREVS and $MAX_DYNAMIC_STRINGS must sum to exactly 96 in Z-code (enforced by tables.c:315-316), so raising one requires lowering the other. This constraint was entirely absent from the guide. Verified against Inform6-6.44 source: - directs.c:96-103: two-tier check (96 hard, MAX_ABBREVS soft) - errors.c:419-426: two distinct error messages - tables.c:315-316: fatalerror if MAX_ABBREVS+MAX_DYNAMIC_STRINGS != 96 - options.c:108-115: MAX_ABBREVS defaults to 64, ceiling 96 - options.c:176-184: MAX_DYNAMIC_STRINGS defaults to 32, ceiling 96 Update appendix-d MAX_ABBREVS and MAX_DYNAMIC_STRINGS entries to note the sum-to-96 constraint. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/appendices/appendix-d-compiler-memory-settings.md | 6 ++++++ guide/part1-language/ch10-compiler-directives.md | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/guide/appendices/appendix-d-compiler-memory-settings.md b/guide/appendices/appendix-d-compiler-memory-settings.md index c45b13a..54e508a 100644 --- a/guide/appendices/appendix-d-compiler-memory-settings.md +++ b/guide/appendices/appendix-d-compiler-memory-settings.md @@ -159,6 +159,9 @@ that the compiler can substitute with single-byte tokens in Z-encoded text, saving space. The Z-machine specification limits this to 96. This setting is not meaningful in Glulx, where abbreviations are unlimited. +`MAX_ABBREVS` and `MAX_DYNAMIC_STRINGS` must sum to exactly 96 in Z-code, so +raising one requires lowering the other. + ```inform6 !% $MAX_ABBREVS=96 Abbreviate "the "; @@ -319,6 +322,9 @@ referenced in strings with the `@00` through `@31` syntax (or `@(N)` for higher numbers). The `string` statement assigns text to these variables at runtime. In Z-code the maximum is 96. +`MAX_DYNAMIC_STRINGS` and `MAX_ABBREVS` must sum to exactly 96 in Z-code, so +raising one requires lowering the other. + ```inform6 !% $MAX_DYNAMIC_STRINGS=64 ``` diff --git a/guide/part1-language/ch10-compiler-directives.md b/guide/part1-language/ch10-compiler-directives.md index 60a6457..20165a9 100644 --- a/guide/part1-language/ch10-compiler-directives.md +++ b/guide/part1-language/ch10-compiler-directives.md @@ -597,8 +597,11 @@ Abbreviate "ing "; Abbreviations reduce the size of encoded text in the story file. The compiler substitutes frequently occurring strings with compact tokens. -> **[Z-machine]** The compiler enforces a hard limit of **96** -> abbreviations for all Z-machine versions it targets (3 and later). +> **[Z-machine]** The compiler defaults to a limit of **64** +> abbreviations (controlled by `$MAX_ABBREVS`, which defaults to 64). +> The hard ceiling is **96**: `$MAX_ABBREVS` may be raised up to 96, but +> `$MAX_ABBREVS` and `$MAX_DYNAMIC_STRINGS` must sum to exactly 96, so +> raising one requires lowering the other (their defaults are 64 and 32). > As of compiler 6.42, abbreviation strings may be of any length > (earlier versions limited them to 64 characters). From f4921f89b2411230bd148d0fc29024aa8f890b9f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 00:06:41 +0000 Subject: [PATCH 04/10] Fix three factual errors in ch12/ch15 verified against compiler source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ch12 §12.4.3: $MAX_ABBREVS Glulx default was 64 (misleading, setting is Z-code only per OPTUSE_ZCODE in options.c); changed to N/A to match ch15 §15.4.1 and the source - ch12 §12.4.3 / ch15 §15.2.2: Both settings said 'hard upper limit of 96' independently, but inform.c lines 223-234 enforce MAX_ABBREVS + MAX_DYNAMIC_STRINGS = 96 exactly in Z-code (shared pool). Updated both chapters to describe the constraint accurately. - ch15 §15.8.1 comparison table: Glulx local variables showed 119 but the usable count is 118 (inform.c line 138 allocates slot 0 as the internal 'sp' register). The Z-machine column correctly showed 15 (not 16); Glulx column corrected to 118 for consistency. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part2-compiler/ch12-compiler-switches.md | 4 ++-- guide/part2-compiler/ch15-compiler-limits.md | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/guide/part2-compiler/ch12-compiler-switches.md b/guide/part2-compiler/ch12-compiler-switches.md index 5f87d2a..f765257 100644 --- a/guide/part2-compiler/ch12-compiler-switches.md +++ b/guide/part2-compiler/ch12-compiler-switches.md @@ -479,8 +479,8 @@ text data: | ------- | -------------- | ------------- | ----------- | | `$DICT_WORD_SIZE` | 6 | 9 | Number of characters stored per dictionary word. Z-code words beyond this length are silently truncated. Increasing this value in Glulx allows the parser to distinguish longer words. | | `$DICT_CHAR_SIZE` | 1 | 1 | Bytes per character in dictionary words. Set to 4 in Glulx to support full Unicode dictionary entries. In Z-code, this is always 1. | -| `$MAX_ABBREVS` | 64 | 64 | Maximum number of `Abbreviate` directives. Z-code has a hard upper limit of 96. | -| `$MAX_DYNAMIC_STRINGS` | 32 | 100 | Maximum number of string substitution variables (`@00`, `@(0)`, etc.). Z-code has a hard upper limit of 96. | +| `$MAX_ABBREVS` | 64 | N/A | Maximum number of `Abbreviate` directives. Z-code only; not meaningful in Glulx. In Z-code, `$MAX_ABBREVS` and `$MAX_DYNAMIC_STRINGS` share a pool of exactly 96 slots and must sum to 96. | +| `$MAX_DYNAMIC_STRINGS` | 32 | 100 | Maximum number of string substitution variables (`@00`, `@(0)`, etc.). In Z-code, `$MAX_ABBREVS` and `$MAX_DYNAMIC_STRINGS` share a pool of exactly 96 slots and must sum to 96. | ### 12.4.4 Grammar and Action Settings diff --git a/guide/part2-compiler/ch15-compiler-limits.md b/guide/part2-compiler/ch15-compiler-limits.md index 64ae5ed..c02ab01 100644 --- a/guide/part2-compiler/ch15-compiler-limits.md +++ b/guide/part2-compiler/ch15-compiler-limits.md @@ -119,11 +119,13 @@ Several additional limits apply across all Z-machine versions: - **Global variables:** All versions support a maximum of 240 globals. -- **Abbreviations:** The Z-machine supports a maximum of 96 - abbreviations (though the compiler default `$MAX_ABBREVS` is 64). - -- **Dynamic strings:** Z-code supports a maximum of 96 dynamic string - variables (`@00` through `@95`). +- **Abbreviations and dynamic strings:** The Z-machine allocates a + shared pool of exactly 96 slots for these two features combined. + The defaults are `$MAX_ABBREVS=64` and `$MAX_DYNAMIC_STRINGS=32` + (summing to 96). If only one value is changed, the compiler + automatically adjusts the other to keep the sum at 96; if both are + set to values that do not sum to 96, the compiler warns and resets + both to their defaults. - **Property values per property:** A single property may hold at most 32,768 values (entries) on either platform. This is a compiler-imposed @@ -512,7 +514,7 @@ trade-offs: | Max attributes | 48 | 48 | 56+ (configurable) | | Max properties | 63 | 63 | No hard limit | | Integer size | 16-bit | 16-bit | 32-bit | -| Local variables | 15 | 15 | 119 | +| Local variables | 15 | 15 | 118 | | Dictionary resolution | 9 chars | 9 chars | Configurable | | Interpreter support | Excellent | Good | Good | | Multimedia | Limited | Limited | Full (via Glk) | From 1676e9acd8f4af5dd94997387a5a0dbeff0de09f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 00:57:25 +0000 Subject: [PATCH 05/10] Fix Initialise() return value 2 description in ch26 The table incorrectly stated that returning 2 from Initialise() suppresses both the banner and the initial Look. Verified against parser.h: if (j ~= 2) Banner(); #Ifndef NOINITIAL_LOOK; ; #Endif; Returning 2 only skips the Banner() call. The action is always performed unconditionally (unless NOINITIAL_LOOK is defined at compile time). - Corrected the table row for return value 2 - Updated the note to accurately describe the use case and mention NOINITIAL_LOOK for games that also want to suppress the initial Look Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part3-library/ch26-library-entry-points.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/guide/part3-library/ch26-library-entry-points.md b/guide/part3-library/ch26-library-entry-points.md index 95e0d76..3d001ea 100644 --- a/guide/part3-library/ch26-library-entry-points.md +++ b/guide/part3-library/ch26-library-entry-points.md @@ -107,7 +107,7 @@ and before the first `Look`. |------ |---------------------------------------------------------- | | 0 | Print the banner, then perform an initial `Look`. | | 1 | Print the banner, then perform an initial `Look` (same as 0). | -| 2 | Do not print the banner or perform an initial `Look`. | +| 2 | Do not print the banner. The initial `Look` is still performed (unless `NOINITIAL_LOOK` is defined). | **Typical usage:** @@ -123,8 +123,10 @@ and before the first `Look`. - The `location` variable *must* be set to a valid room object before `Initialise` returns, or the game will crash. - If `Initialise` prints any text, it appears before the banner. -- A return value of 2 is useful when the game wants to display a - custom title screen before normal play begins. +- A return value of 2 is useful when the game provides its own banner + output inside `Initialise` and wants to suppress the library's default + banner. The initial `Look` still runs; to suppress that too, compile + with `Constant NOINITIAL_LOOK;` before including the library. ## 26.3 `BeforeParsing()` From 8dde6c294a7a5568c1a65fe9d3eecaa0177350be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 01:05:27 +0000 Subject: [PATCH 06/10] =?UTF-8?q?Fix=20single-precision=20float=20opcode?= =?UTF-8?q?=20count=20in=20ch30:=2026=20=E2=86=92=2029?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler's opcodes_table_g[] (asm.c lines 786–814) contains 29 single-precision floating-point opcodes with the GOP_Float flag: 3 conversion (numtof, ftonumz, ftonumn), 2 rounding (ceil, floor), 5 arithmetic (fadd, fsub, fmul, fdiv, fmod), 4 transcendental (sqrt, exp, log, pow), 7 trig (sin, cos, tan, asin, acos, atan, atan2), 6 float comparisons (jfeq, jfne, jflt, jfle, jfgt, jfge), and 2 special value tests (jisnan, jisinf). The chapter body text (§30.9.3) already listed all 29 correctly but the introductory sentence and the §30.7.2 summary table both said 26. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part4-vm/ch30-glulx-architecture.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/part4-vm/ch30-glulx-architecture.md b/guide/part4-vm/ch30-glulx-architecture.md index 95bfceb..b76ad09 100644 --- a/guide/part4-vm/ch30-glulx-architecture.md +++ b/guide/part4-vm/ch30-glulx-architecture.md @@ -493,7 +493,7 @@ over 130 opcodes organised into the following categories: | Search | 0x0150–0x0152 | 3 | Linear, binary, and linked list search | | Memory/heap | 0x170–0x179 | 4 | Zero, copy, malloc, free | | Acceleration | 0x180–0x181 | 2 | Register accelerated functions | -| Floating point | 0x190–0x1C9 | 26 | Single-precision IEEE-754 operations | +| Floating point | 0x190–0x1C9 | 29 | Single-precision IEEE-754 operations | | Double precision | 0x200–0x239 | 32 | Double-precision IEEE-754 operations | ### 30.7.3 Feature-Gated Opcode Groups @@ -702,7 +702,7 @@ Z-machine produces an error. ### 30.9.3 Single-Precision Opcodes -Twenty-six opcodes provide single-precision floating-point operations. +Twenty-nine opcodes provide single-precision floating-point operations. These are gated behind the `GOP_Float` feature flag and require Glulx version 3.1.2 or later. The opcodes fall into several groups: From 13e98d6a3d352215167463aee31446ba52ef680d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 01:15:41 +0000 Subject: [PATCH 07/10] =?UTF-8?q?Fix=206=20wrong=20Glk=20function=20select?= =?UTF-8?q?ors=20in=20ch31=20=C2=A731.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrected the Glk function selector table against infglk.h (inform6lib-6.12.8): - glk_window_iterate: $0040 → $0020 (decimal 32) - glk_window_open: $0047 → $0023 (decimal 35) - glk_window_get_size:$002F → $0025 (decimal 37) - glk_put_buffer: $0086 → $0084 (decimal 132) - glk_select: $00E0 → $00C0 (decimal 192) - glk_fileref_create_by_prompt: $0160 → $0062 (decimal 98) Each wrong value was actually the selector for a different Glk function; e.g. $0040=glk_stream_iterate, $00E0=glk_image_get_info, $0160=glk_current_time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part4-vm/ch31-glulx-instruction-set.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guide/part4-vm/ch31-glulx-instruction-set.md b/guide/part4-vm/ch31-glulx-instruction-set.md index 747b273..2518ba6 100644 --- a/guide/part4-vm/ch31-glulx-instruction-set.md +++ b/guide/part4-vm/ch31-glulx-instruction-set.md @@ -898,17 +898,17 @@ function. Common selectors include: | Selector | Glk Function | Description | |---|---|---| | `$0004` | `glk_gestalt` | Query Glk capabilities. | -| `$0040` | `glk_window_iterate` | Iterate over windows. | -| `$0047` | `glk_window_open` | Open a new window. | -| `$002F` | `glk_window_get_size` | Get window dimensions. | +| `$0020` | `glk_window_iterate` | Iterate over windows. | +| `$0023` | `glk_window_open` | Open a new window. | +| `$0025` | `glk_window_get_size` | Get window dimensions. | | `$0080` | `glk_put_char` | Output a single character. | | `$0081` | `glk_put_char_stream` | Output a character to a stream. | -| `$0086` | `glk_put_buffer` | Output a buffer of characters. | +| `$0084` | `glk_put_buffer` | Output a buffer of characters. | | `$00A0` | `glk_char_to_lower` | Convert character to lowercase. | | `$00D0` | `glk_request_line_event` | Request line input. | | `$00D2` | `glk_request_char_event` | Request character input. | -| `$00E0` | `glk_select` | Wait for and retrieve an event. | -| `$0160` | `glk_fileref_create_by_prompt` | Prompt user for a file. | +| `$00C0` | `glk_select` | Wait for and retrieve an event. | +| `$0062` | `glk_fileref_create_by_prompt` | Prompt user for a file. | These selectors are defined in the `infglk.h` header file. The complete set of selectors is documented in the Glk specification. From cca5cf1782138afb76e307f2a8b98c147d246495 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 01:24:11 +0000 Subject: [PATCH 08/10] =?UTF-8?q?Fix=20A2=20alphabet=20reserved=20position?= =?UTF-8?q?s=20count=20in=20ch33=20=C2=A733.3.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Limitations section incorrectly stated "Positions 0–2 are reserved for shift characters". The compiler's map_new_zchar() function (chars.c) uses the loop "for (i=2; i<26; i++)", which starts at position 2. Only positions 0 and 1 are skipped entirely; position 2 is scannable and can be replaced by the single-character Zcharacter form. The 21-position count is correct (26 total − 2 reserved − 3 protected = 21), but the description of which positions are reserved was wrong. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/part5-advanced/ch33-internationalization-localization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/part5-advanced/ch33-internationalization-localization.md b/guide/part5-advanced/ch33-internationalization-localization.md index c81f985..b0904c8 100644 --- a/guide/part5-advanced/ch33-internationalization-localization.md +++ b/guide/part5-advanced/ch33-internationalization-localization.md @@ -737,7 +737,7 @@ extension table. - The Z-machine can support at most 97 extra characters (ZSCII 155–251) beyond the base Latin-1 set. - Unicode characters beyond U+FFFF cannot be placed in the ZSCII table. -- Alphabet A2 has 21 replaceable positions. Positions 0–2 are reserved for +- Alphabet A2 has 21 replaceable positions. Positions 0 and 1 are reserved for shift characters, and three positions (`.`, `,`, and `~` at positions 12, 13, and 19) are protected as essential punctuation, but the remaining 21 positions (digits 0–9 and miscellaneous punctuation) may be replaced. From 4cbdbc15f83676c15bbafd3df29a2322296a3fd7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 01:32:40 +0000 Subject: [PATCH 09/10] fix(appendix-g): correct Z-only platform labels for class_objects_array and lowest_global_number MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both constants produce "System constant not implemented in Glulx" at runtime: neither class_objects_array_SC nor lowest_global_number_SC is handled in value_of_system_constant_g() in expressp.c. The appendix incorrectly labelled them Z/G. - §G.3: class_objects_array Z/G → Z - §G.10.2: lowest_global_number Z/G → Z - §G.11: move both constants from "Both VMs" list to "Z-machine only" list Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- .../appendix-g-system-constants-reference.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/guide/appendices/appendix-g-system-constants-reference.md b/guide/appendices/appendix-g-system-constants-reference.md index 7a49663..199ab0a 100644 --- a/guide/appendices/appendix-g-system-constants-reference.md +++ b/guide/appendices/appendix-g-system-constants-reference.md @@ -81,7 +81,7 @@ classes. | `highest_object_number` | Z/G | The highest valid object number. The valid range of object numbers is `#lowest_object_number` through `#highest_object_number` inclusive. | | `lowest_class_number` | Z/G | Always 0. Classes are numbered starting from 0. | | `highest_class_number` | Z/G | The index of the last class, equal to (total classes) − 1. | -| `class_objects_array` | Z/G | Address of the class-numbers table. This table maps class indices to their corresponding object numbers. On Glulx, the address is in RAM. | +| `class_objects_array` | Z | Address of the class-numbers table. This table maps class indices to their corresponding object numbers. | --- @@ -209,7 +209,7 @@ error when `$OMIT_SYMBOL_TABLE` is set. | Constant | VM | Description | |----------|-----|-------------| -| `lowest_global_number` | Z/G | Always 16. On the Z-machine, globals 0–15 are reserved for the VM's local variable area. User globals start at index 16. | +| `lowest_global_number` | Z | Always 16. On the Z-machine, globals 0–15 are reserved for the VM's local variable area. User globals start at index 16. | | `highest_global_number` | Z | The index of the last global variable, equal to 16 + (total user globals) − 1. | | `globals_array` | Z/G | Address of the global variables area. On Z-machine, this is the variables offset. On Glulx, this is the variables offset. | | `global_names_array` † | Z | Address of the global-names table. | @@ -253,11 +253,11 @@ targeting Glulx, and vice versa. `attribute_names_array`, `highest_property_number`, `property_names_array`, `highest_routine_number`, `routines_array`, `routine_names_array`, `routine_flags_array`, -`highest_global_number`, `global_names_array`, +`lowest_global_number`, `highest_global_number`, `global_names_array`, `global_flags_array`, `highest_array_number`, `arrays_array`, `array_names_array`, `array_flags_array`, `highest_constant_number`, `constants_array`, -`constant_names_array`, `oddeven_packing`. +`constant_names_array`, `class_objects_array`, `oddeven_packing`. **Glulx only**: @@ -273,10 +273,9 @@ targeting Glulx, and vice versa. `action_names_array`, `lowest_fake_action_number`, `highest_fake_action_number`, `fake_action_names_array`, -`lowest_routine_number`, `lowest_global_number`, `globals_array`, +`lowest_routine_number`, `globals_array`, `lowest_array_number`, `lowest_constant_number`, `lowest_class_number`, `highest_class_number`, -`class_objects_array`, `lowest_object_number`, `highest_object_number`, `grammar_table`, `dictionary_table`, `highest_meta_action_number`. From e495f5e025637162033c5b1f3c6112f530a66d33 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 03:30:09 +0000 Subject: [PATCH 10/10] =?UTF-8?q?fix(appendix-k):=20correct=20abbreviation?= =?UTF-8?q?=20limit=20description=20in=20=C2=A7K.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/36bit/inform-guide/sessions/075b6576-6f18-43a2-a247-1e42c9f0296b Co-authored-by: 36bit <24438359+36bit@users.noreply.github.com> --- guide/appendices/appendix-k-inform6-bnf-grammar.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guide/appendices/appendix-k-inform6-bnf-grammar.md b/guide/appendices/appendix-k-inform6-bnf-grammar.md index c29b04b..869586b 100644 --- a/guide/appendices/appendix-k-inform6-bnf-grammar.md +++ b/guide/appendices/appendix-k-inform6-bnf-grammar.md @@ -368,7 +368,9 @@ abbreviate-directive ``` Declares one or more abbreviation strings for Z-machine text compression. -Maximum 96 abbreviations in Z-code (64 in version 3). +The hard ceiling is 96 abbreviations in Z-code; the default `$MAX_ABBREVS` +setting is 64, and the 96-slot pool is shared with `$MAX_DYNAMIC_STRINGS`. +Not supported in Glulx mode. ### §K.3.3 Array