Summary of Z‑Machine Version Differences

Section numbers refer to version 1.1 of the Z‑Machine Standards Document.

 

Memory Limits

Property (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Maximum story length 1.1.4 128 KB 128 KB 128 KB 256 KB 256 KB 512 KB 512 KB* 512 KB
Address packing factor 1.2.3 2 2 2 4 4 4, with offsets 4, with offsets 8
Number of properties 12.2 31 31 31 63 63 63 63 63
Maximum number of objects 12.3.1 12.3.2 255 255 255 65535 65535 65535 65535 65535
Number of attributes 12.3.1 12.3.2 32 32 32 48 48 48 48 48
Maximum property length 12.4.1 12.4.2 8 8 8 64 64 64 64 64

Text Encoding

Feature (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Shift lock characters 3.2.2 3.2.3 3.7 Yes Yes
Abbreviations 3.3 32 96 96 96 96 96 96
Newline character 3.5.2 3.5.3 Character 1 in all alphabets Character 7 in A2 Character 7 in A2 Character 7 in A2 Character 7 in A2 Character 7 in A2 Character 7 in A2 Character 7 in A2
Standard alphabet A2 3.5.3 3.5.4 Includes “<” Includes newline Includes newline Includes newline Includes newline Includes newline Includes newline Includes newline
Custom alphabet table 3.5.5 11.1 Yes Yes Yes Yes
Dictionary resolution 3.7 13.3 13.4 6 6 6 9 9 9 9 9
Custom Unicode table 3.8.5.2 11.1 Yes Yes Yes Yes
Dictionary words ending with truncated characters have no end bit 3.7 Yes Yes

I/O

Capability (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Undo 6.1.4 Yes Yes Yes Yes
Timed input 6.4 10.5.3 Yes Yes Yes Yes Yes
Sound effect interrupt 6.4 Yes Yes Yes Yes
Newline interrupt 6.4 Yes
Player input copied to transcript 7.1.1.1 Yes Yes Yes Yes Yes Yes Yes
Output streams 3 and 4 7.1.2 Yes Yes Yes Yes Yes Yes
Buffer control 7.2.1 Yes Yes Yes Yes Yes
Output stream 1 can be turned off 7.3 7.4 Yes Yes Yes Yes Yes Yes
Load/save arbitrary files 7.6 Yes Yes Yes Yes
Sound effects 9.1 Yes Yes Yes Yes Yes Yes
Sound effect bits in header 9.1.1 9.1.2 Flags 2 bit 7 Flags 2 bit 7 and Flags 1 bit 5 Flags 2 bit 7 Flags 2 bit 7
Sound effects can repeat 9.4.3 Yes Yes Yes Yes
Input stream 1 10.2 Yes Yes Yes Yes Yes Yes
Mouse 10.3 Yes Yes Yes Yes
Directly readable mouse buttons 10.3.3 Yes
Mouse can be constrained to windows 10.3.4 Yes
Mouse menus 10.4 Yes
Terminating characters table 10.5.2.1 Yes Yes Yes Yes Yes
Single character input 10.6 Yes Yes Yes Yes Yes
Line input buffer byte 0 15.read Maximum input length minus 1 Maximum input length minus 1 Maximum input length minus 1 Maximum input length minus 1 Maximum input length Maximum input length Maximum input length Maximum input length
Line input buffer byte 1 15.read First returned character First returned character First returned character First returned character Length of text Length of text Length of text Length of text
Line input text has zero terminator 15.read Yes Yes Yes Yes
Line input tokenization is optional 15.read Yes Yes Yes Yes

Screen Model

Feature (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Font size written to header 8.1.1 11.1 Width, height Height, width Width, height Width, height
Character graphics bit in header 8.1.5.1 11.1 Yes Yes Yes
Interpreter responsible for status line 8.2 10.5.1 Yes Yes Yes, and set header bit if unable to provide
“Time game” bit in header 8.2.1 11.1 Yes
Colored text output 8.3 Yes Yes, per window Yes Yes
Colors 10–12 and −1 supported 8.4 Yes
Interpreter writes default colors in header even if colors not supported 8.3.2 Yes
Screen size in units written to header 8.4.3 Yes Yes Yes Yes
Screen windows 8.6.1 8.7.2 8.8.3 1 1 2 2 2 8 2 2
Clear upper window when splitting 8.6.1.1.2 Yes
Initial lower window cursor position 8.6.3 8.7.2.2 Bottom Bottom Bottom Bottom Top Top Top Top
Text styles 8.7.1 Yes Yes Yes Yes Yes
Game can move cursor 8.7.2.3 8.8.3.5 Yes, upper window only Yes, upper window only Yes, all windows Yes, upper window only Yes, upper window only
Upper window always fixed‑pitch 8.7.2.4 Yes Yes Yes Yes
Upper window never buffered 8.7.2.5 Yes Yes Yes Yes Yes
Cursor movement after @erase_window 8.7.3.2.1 Bottom left for lower window, top left for upper window Top left Top left Top left Top left
Interpreter sets header bit to request status line redraw 8.8.2 Yes
Overlapping, movable windows 8.8.3 Yes    
Window attributes and properties 8.8.3.1 8.8.3.2 Yes
Pictures 8.8.6 Yes

Header Fields

Field (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Original Flags 1 bits 11.1 1, 2, 4, 5, 6
New Flags 1 bits 11.1 2, 3, 4, 7 0, 2, 3, 4, 7 0, 1, 2, 3, 4, 5, 7 0, 2, 3, 4, 7 0, 2, 3, 4, 7
Flags 2 bits 11.1 0 0 0, 1 0, 1 0, 1, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8 0, 1, 3, 4, 5, 6, 7 0, 1, 3, 4, 5, 6, 7
File length and checksum in header 11.1 Yes Yes Yes Yes Yes Yes
Interpreter number and version in header 11.1 Yes Yes Yes Yes Yes
Screen size (rows/columns) in header 11.1 Yes Yes Yes Yes Yes
Screen size (units) in header 11.1 Yes Yes Yes Yes
Routine and string offsets in header 11.1 Yes Yes
Output stream 3 total width written to header 11.1 Yes
Header extension table 11.1 Yes Yes Yes Yes

Routines & Instructions

Opcodes are listed where they first appear or change behavior. See the Standards Document for full opcode semantics.

Item (Std §) V1 V2 V3 V4 V5 V6 V7 V8
Entry point 5.4 5.5 11.1 Byte address of instruction Byte address of instruction Byte address of instruction Byte address of instruction Byte address of instruction Packed address of routine Byte address of instruction Byte address of instruction
EXT opcode format 4.3 Yes Yes Yes Yes
Initial local variable values in routine header 5.2.1 Yes Yes Yes Yes
Maximum routine arguments 6.4.1 3 3 3 7 7 7 7 7
@aread Yes Yes Yes Yes
@art_shift Yes Yes Yes Yes
@buffer_mode Yes Yes Yes Yes Yes
@call Yes Yes Yes
@call_1n Yes Yes Yes Yes
@call_1s Yes Yes Yes Yes Yes
@call_2n Yes Yes Yes Yes
@call_2s Yes Yes Yes Yes Yes
@call_vn Yes Yes Yes Yes
@call_vn2 Yes Yes Yes Yes
@call_vs Yes Yes Yes Yes Yes
@call_vs2 Yes Yes Yes Yes Yes
@catch Yes Yes Yes Yes
@check_arg_count Yes Yes Yes Yes
@check_unicode Yes Yes Yes Yes
@copy_table Yes Yes Yes Yes
@draw_picture Yes
@encode_text Yes Yes Yes Yes
@erase_line Yes, operand must be 1 Yes, operand must be 1 Yes, operand is number of pixels Yes, operand must be 1 Yes, operand must be 1
@erase_picture Yes
@erase_window Yes Yes Yes Yes Yes
@get_cursor Yes Yes Yes Yes Yes
@get_wind_prop Yes
@input_stream Yes Yes Yes Yes Yes Yes
@log_shift Yes Yes Yes Yes
@make_menu Yes
@mouse_window Yes
@move_window Yes
@not 1OP:143 1OP:143 1OP:143 1OP:143 VAR:248 VAR:248 VAR:248 VAR:248
@output_stream Yes Yes Yes, with optional 2nd operand Yes, with optional 2nd and 3rd operands Yes, with optional 2nd operand Yes, with optional 2nd operand
@picture_data Yes
@picture_table Yes
@piracy Yes Yes Yes Yes
@pop Yes Yes Yes Yes
@pop_stack Yes
@print_form Yes
@print_table Yes Yes Yes Yes
@print_unicode Yes Yes Yes Yes
@pull Yes Yes Yes Yes Yes Yes, with optional operand Yes Yes
@push_stack Yes
@put_wind_prop Yes
@read_char Yes Yes Yes Yes Yes
@read_mouse Yes
@restore 0OP:182, branches 0OP:182, branches 0OP:182, branches 0OP:182, stores EXT:1, stores, 3 optional operands EXT:1, stores, 3 optional operands EXT:1, stores, 3 optional operands EXT:1, stores, 3 optional operands
@restore_undo Yes Yes Yes Yes
@save 0OP:181, branches 0OP:181, branches 0OP:181, branches 0OP:181, stores EXT:0, stores, 3 optional operands EXT:0, stores, 3 optional operands EXT:0, stores, 3 optional operands EXT:0, stores, 3 optional operands
@save_undo Yes Yes Yes Yes
@scan_table Yes Yes Yes Yes Yes
@scroll_window Yes
@set_colour Yes Yes, with optional 3rd operand Yes Yes
@set_cursor Yes Yes Yes, with optional 3rd argument Yes Yes
@set_font Yes Yes Yes Yes
@set_margins Yes
@set_text_style Yes Yes Yes Yes Yes
@set_window Yes Yes Yes Yes Yes Yes
@show_status Yes No effect No effect No effect No effect No effect
@sound_effect Yes Yes Yes Yes Yes Yes
@split_window Yes Yes Yes Yes Yes Yes
@sread Yes Yes Yes Yes, with optional 3rd and 4th operands
@throw Yes Yes Yes Yes
@tokenise Yes Yes Yes Yes
@verify Yes Yes Yes Yes Yes Yes
@window_size Yes
@window_style Yes

Footnotes

  • * The maximum length for V7 is given as 320 KB in Standard 1.0, but corrected to 512 KB in Standard 1.1.
  • Applies to all windows in V6.
  • §6.4.1 incorrectly lists the maximum number of routine arguments in V4 as 3, but V4 has the @call_vs2 opcode, allowing 7.