ZOWIE

example program:


  

This is an HTML5-based interpreter for the esoteric programming language ZOWIE. The reference implementation of the interpreter, written in Python, is itself being interpreted by Skulpt, written in Javascript.

Select an example program from the dropdown box, then click "Run" to run it. Or edit an example program in the text box, or create your own program.

; Hello, world! in ZOWIE ; This example source is in the public domain. MOV R0, 72 MOV R0, 101 MOV R0, 108 MOV R0, 108 MOV R0, 111 MOV R0, 44 MOV R0, 32 MOV R0, 119 MOV R0, 111 MOV R0, 114 MOV R0, 108 MOV R0, 100 MOV R0, 33 MOV R0, 10
; Display the Roman alphabet in reverse, in ZOWIE ; This example source is in the public domain. MOV R10, 90 ; initially it's "Z" MOV R1, R1 ; BEGIN TRANSACTION for "REPEAT" MOV R0, R10 ; output character MOV R8, R10 ; decrement character MOV R5, 1 MOV R10, R8 MOV R8, R10 ; test if character is above "@" MOV R5, 64 MOV R3, R8 ; COMMIT AND REPEAT if non-zero
; Compute a factorial, in ZOWIE ; This example source is in the public domain. ; Expected output is the letter 'x' (Unicode character 120). ; NOTE: this code is also able to properly compute 0! = 1. MOV R11, 5 ; let's find 5! MOV R10, 1 ; accumulator MOV R8, R11 ; increase multiplicand MOV R4, 1 MOV R11, R8 MOV R1, R1 ; BEGIN TRANSACTION for "REPEAT" MOV R8, R11 ; decrease multiplicand MOV R5, 1 MOV R11, R8 MOV R1, R1 ; BEGIN TRANSACTION for "IF" MOV R8, R10 ; accumulator MOV R6, R11 ; multiplied MOV R10, R8 MOV R2, R11 ; COMMIT if multiplicand above zero, or ROLLBACK otherwise MOV R3, R11 ; COMMIT AND REPEAT if multiplicand above zero MOV R0, R10 ; output accumulator (as single Unicode character)