ZA(1) General Commands Manual ZA(1)

zaZ-machine assembler

za [-o outfile] [-r release] [-s serial] [-z z-machine version] source

The za utility assembles Z-machine stories.

The following options are available:

outfile
Specify the filename of the resulting story file. The default is out.zX, where “X” is the Z-machine version.
Preallocate enough space for any Unicode table near the beginning of the file. By default a Unicode table (if needed) is written near the end of the file, but if the file extends beyond 64K, the Unicode table will be out of bounds, as it's required to be a 16-bit address. You can get around this by preallocating space near the beginning of the file with the caveat that it will always allocate the maximum amount of space, regardless of how large your Unicode table winds up being.
release
Set the release number. This must be a value between 0 and 65535. The default is 1.
serial
Set the serial number. This must be a string of six characters. The default is the current date in the traditional Z-machine format.
za builds a collection of Unicode characters it encounters in order to create a Unicode table, if necessary. Since this is a single-pass assembler, the Unicode table can't be written until after the whole file is read, meaning it must be placed in memory all instructions. However, the Unicode table must be at a 16-bit address, and instructions can extend beyond that. The -p option will preallocate space at the beginning of the file, but must allocate enough space for the largest possible table. To avoid this, you can create your own table wherever you want with the unicode_table directive, but that requires you to know which Unicode characters you will be using. The --suggest-unicode-table will, after assembly, print out a suggested unicode_table directive that includes all Unicode characters used in the program. This allows you to include a more compact Unicode table at a 16-bit address.
zversion
Set the Z-machine version. Versions 1-8 are supported. The default is 8.

zd(1)

Chris Spiegel ⟨cspiegel@gmail.com⟩

September 14, 2023