This is a Z-machine macro assembler for all versions of Z-machine from 1 to 10. Unfortunately there is not currently any documentation. This file is written in C and is licensed under GNU GPL version 3 or later version.
(I called it “Frolg” after a Zork spell; the names like “Frotz” and “Gnusto” are already taken so I didn’t use those. The compiler (still in progress) is called “Berzio”.)
Please write any question/suggestion/comment/complaints if you have.
None yet but if I write one it will support. Only minor changes should be necessary to support version 9 in existing interpreters, though. It extends some things to be less limitation while retaining simplicity and 16-bits of Z-machine.
There were already plans for a version 9, so you should probably call yours version 10.
But realistically, unless you have authors, compiler writers, and interpreter writers on board, this won’t go anywhere. And now that we have Glulx, I can’t conceive how you would get them on board.
Version 1.1 is now released which adds a lot of improvement and bug fix, including (but not limited to):
Unused things in the standard library are removed.
A bug with deciding which instructions are branch has been fixed (one thing that didn’t work before was the EQUAL? instruction).
Input encoding can be ASCII/ZSCII (the default), CP437/CP850, Windows-1252/ISO-8859-1, or UTF-8. (These four should be sufficient; I don’t intend to add more.)
COMPLIANT mode, which disables the text packing algorithm and allows Unicode translation tables to be used.
Command-line parameters to set macros and other things.