ZAPF

From IFWiki
Jump to: navigation, search
This article is a stub. You can help IFWiki by expanding it.
TODO: More info needed. Add link once ZAPF finds a permanent home on the IF Archive.

ZAPF is an assembler for the Z-machine written by Jesse McGrew. It runs under .NET/Mono on Windows, Linux, and probably Mac OS X.

It is an attempt at reconstructing Infocom's ZAP. Thus, by default, it uses instruction names and syntax that will be unfamiliar to Inform programmers.

; "Hello World" for ZAPF (V3)

GLOBAL::                        ; labels that must be defined
OBJECT::                        ;   even though this simple demo
WORDS::                         ;   doesn't use them
IMPURE::                        ; end of dynamic memory
VOCAB:: .BYTE 0,4,0,0           ; minimal dictionary
ENDLOD::                        ; end of low memory

        .FUNCT GO
START::                         ; entry point
        PRINTI "Hello, world!"
        CRLF
        QUIT                    ; game over once it returns

        .END                    ; end of input

Features

  • Supports both classic (Infocom) and modern (Inform) instruction names and syntax.
  • Supports Z-machine version 3 at present, with versions 4-8 planned for future updates. However, there is already the document of version 3-8.

Links