ZOWIE
Chris Pressey's 2009 esoteric machine language with a single MOV instruction, in which every operation, even structured loops, is triggered by writing to a memory-mapped register.
Created by Chris Pressey (Cat's Eye Technologies)
ZOWIE is an esoteric, assembly-like programming language designed by Chris Pressey of Cat’s Eye Technologies and first released on 29 December 2009. It has exactly one instruction, MOV, and no jumps, labels, or branch offsets. All of its other behaviour, including arithmetic, input and output, and even structured loops and conditionals, is memory-mapped: it happens as a side effect of writing to or reading from special registers. ZOWIE is a small but carefully worked-out answer to a question that sounds easy until you try it: can structured control flow be triggered purely by changes to memory?
A note on the catalogue entry. The encyclopedia index lists this language as “Zowie, 2010, Procedural, Scientific.” The language is ZOWIE (all capitals), and its release is dated 29 December 2009, both in the distribution’s version history and on the 2010 Cat’s Eye project page (version 1.0, revision 2009.1229). The 2010 date probably reflects when it first became widely visible. The project page carried a “Copyright ©2010” footer, the Esolang wiki article appeared in November 2010, and the 99 Bottles of Beer entry is dated 30 November 2010. ZOWIE is an esoteric language with no connection to scientific computing.
History & Origins
The BitChanger problem
ZOWIE’s starting point was someone else’s language. BitChanger, created by Jeffry Johnston on 2 December 2000, is a brainfuck derivative that works on single bits. Johnston tried to shrink its instruction set further, while keeping it Turing-complete, by memory-mapping its loop operation. According to Pressey, that attempt did not succeed. The ZOWIE README says the language was inspired by that “unsuccessful attempt”.
Pressey first assumed the difficulty came from BitChanger’s minimalism. Memory-mapped flow control in general seemed simple: start a loop when one location is written, and end it when another is written. It turned out not to be that simple. A structured loop needs a way to jump to a known point, such as the start or the end. In most languages that point can be found from the program text. But if the end of a loop is defined as “the moment some memory location changes”, then finding it ahead of time is, in general, undecidable. Pressey cites Rice’s theorem, a generalisation of the Halting Problem. Finding the start of a loop is easy, because you know where you are when you enter it. Every other point in the loop is the problem.
Summer to winter, 2009
The README calls ZOWIE “the last of several, sometimes painful, attempts over the summer of 2009” to achieve this goal. The final idea “crystallized at about the time September turned into October”. The specification is signed Chris Pressey, December 29th, 2009 CE, Evanston, IL, and version 1.0 was released that day. With tongue in cheek, the README also lists a secondary design goal: to “strike the perfect balance between It’s a Mad Mad Mad Mad World and The Party”. It declares this goal “a morbid failure”.
To “mitigate retooling costs”, ZOWIE borrowed its architecture and syntax from SMITH, Pressey’s self-modifying, jump-free assembly-like language from around July 2000. The Cat’s Eye catalogue lists SMITH and BitChanger as ZOWIE’s two influences.
Design Philosophy
ZOWIE is built around two ideas that don’t normally go together:
- Structured: in the sense of structured programming, the programmer never deals with
gotos, offsets, or labels. - Memory-mapped: every change in control flow is triggered by writing to a memory location, not by a syntactic construct.
ZOWIE solves the “where does the loop end?” problem with transactions. It never searches for the end of a loop. Instead, it saves the entire machine state when a loop or conditional begins. The program then decides later whether to keep that state, discard it, or go back to it. A REPEAT loop (condition at the end) and an IF (undo the body if the condition was false) can both be built this way. Combining the two gives a general WHILE loop.
Once memory-mapped loops worked, Pressey decided to memory-map everything. That is why the language has only one instruction.
Key Features
One instruction, five forms
Registers are numbered from 0 upward, with no upper limit. Each holds a non-negative integer of unlimited size and starts at 0. The only instruction is MOV destination, source, in five forms:
| |
Square brackets mean indirect access: R[R8] is the register whose number is stored in R8. Since version 1.1, instruction and register names must be uppercase.
The memory-mapped registers
| Register | On write | On read |
|---|---|---|
R0 | Output the value as a Unicode character | Wait for and return a character from input |
R1 | BEGIN TRANSACTION: push a copy of all registers and the current instruction location | Always 1 |
R2 | Value > 0: COMMIT (discard the saved state). Value = 0: ROLLBACK (restore the registers, but keep running from the current instruction) | Always 2 |
R3 | Value > 0: COMMIT AND REPEAT (jump back to where the transaction began and start it again). Value = 0: COMMIT | Always 3 |
R4 | Add the value to R8 | Always 4 |
R5 | Subtract the value from R8 (the result never goes below zero) | Always 5 |
R6 | Multiply R8 by the value | Always 6 |
R7 | Store the boolean negation of the value in R8 | Always 7 |
R8 | Ordinary register, used as the accumulator for R4 to R7 | — |
Reads and writes can have side effects, so the order of operations within an instruction is fixed. First the indirect source register (if any) is read, then the direct source, then the indirect destination (if any). Finally, the direct destination is written.
Examples
“Hello, world!” is just a series of writes to the output register:
| |
The sample program in the Cat’s Eye catalogue prints the alphabet backwards, from Z to A, with a transaction-based REPEAT loop:
| |
Turing-completeness
The specification gives a direct translation of each brainfuck command into ZOWIE. A brainfuck [ becomes two nested transactions: one for “REPEAT”, then one for “IF”, with the tested value saved on a stack in between. A ] writes the saved value to R2 and then to R3. Because IF plus REPEAT gives WHILE, and the registers are unbounded, Pressey argues that ZOWIE is Turing-complete. In June 2020 he updated the Esolang wiki article to state this claim explicitly.
The translation has one visible side effect. A brainfuck loop whose cell is already zero never runs. The equivalent ZOWIE transaction does run, and is then rolled back. Registers can be restored, but input and output that happened in the meantime cannot be undone. This doesn’t affect Turing-completeness, but it limits how ZOWIE programs can interact with the outside world.
Evolution
ZOWIE has changed very little as a language. Most of its revisions concern implementations, tests, and packaging:
| Version / revision | Changes |
|---|---|
| 1.0 (29 Dec 2009) | Initial release; zowie.py reference interpreter (the 2010 project page lists Python 2.5.2 or later) |
| 1.0 rev. 2011.1214 | Minor HTML documentation tweaks |
| 1.0 rev. 2012.0325 | Documentation converted to Markdown; PEP 8 cleanups |
| 1.0 rev. 2014.0819 | Runs under Skulpt in the browser; Falderal tests; Unlicense added |
| 1.1 (Sept 2014) | Stricter syntax (uppercase names, no loose indirect references); can be compiled with RPython from PyPy 2.3.1 |
| 1.1 rev. 2019.0122 | Example JavaScript for running under Skulpt in a web page |
| 1.1 rev. 2021.0622 | Reference implementation runs under Python 2 or Python 3; compiles with RPython from PyPy 7.3.5 |
| 1.1 rev. 2021.0729 | Spec typo fix (reported by Sgeo); new Haskell implementation, zowie-hs; more tests |
| 1.1 rev. 2021.1022 | zowie-hs can be built to JavaScript with the Haste compiler in a container |
Version 1.1 is the only change to the language definition. Its version history explains that the stricter parsing changed the language, “but not in any jaw-dropping way”, so only the minor version number went up. The whole distribution, including the specification, both implementations, and the examples (hello.zow, cat.zow, chars.zow, fact.zow), is dedicated to the public domain.
Current Relevance
The language is stable rather than abandoned. Cat’s Eye classifies it as mature. The specification hasn’t changed since version 1.1 in 2014, which makes the “Dormant” label fair for the design. The repository is still maintained, though: in September 2024 it moved to the REUSE licensing convention and ran its Haskell tests under both Hugs and GHC, and in July 2026 it received a launcher update for the online interpreter. The reference distribution is hosted on Codeberg, with a mirror on GitHub. Anyone can try the language in a web browser at catseye.tc, where the Python interpreter runs under Skulpt. The installation page notes that it doesn’t yet support input.
ZOWIE’s community is small, as with most esoteric languages. Its main traces outside Cat’s Eye are the Esolang wiki article and one 99 Bottles of Beer program, written by Marinus Oosters in 2010.
Why It Matters
ZOWIE is a clear, small demonstration of a real computer-science tension. Structured control flow usually depends on being able to find the matching end of a block in the program text. If block boundaries are defined by runtime memory writes instead, that search becomes undecidable. ZOWIE doesn’t try to find the end of a loop. It borrows the transaction from databases: checkpoint the entire machine state, then commit, roll back, or repeat. With that, the language gets loops and conditionals without a single jump or label.
The design also shows, in a playful way, a point familiar from hardware. Memory-mapped I/O lets a CPU treat devices as addresses, and ZOWIE pushes the same idea to its limit. Output, arithmetic, and control flow are all addresses, and the only thing a program ever does is move a number from one place to another.
Timeline
Notable Uses & Legacy
Cat's Eye Technologies online installation
catseye.tc hosts a browser-based ZOWIE interpreter: the Python reference implementation running under Skulpt, a Python interpreter written in JavaScript, with selectable example programs
99 Bottles of Beer project
Marinus Oosters wrote a ZOWIE version of the song, published on 30 November 2010 in the site's esoteric language category. It builds the lyrics from registers holding character codes and loops using transactions
Turing-completeness argument via brainfuck
The ZOWIE specification includes a translation of every brainfuck command into ZOWIE instructions, which Pressey uses to argue that the language is Turing-complete