We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
NANDNZ
Jump to navigation
Jump to search
NANDNZ is an OISC inspired by Subleq.
Overview
NANDNZ takes 3 arguments:
A B C
It NANDs values at A and B, stores the result in A, then jumps to C if the result is not 0, otherwise, it proceeds to the next instruction. If it jumps into a negative address, the program halts.
I/O extension
If A is -1, it inputs a character into B. If B is -1, it outputs A as a character.
Examples
Hello, world!
0 0 3 5 -1 72 8 -1 101 11 -1 108 14 -1 108 17 -1 111 20 -1 44 23 -1 32 26 -1 119 29 -1 111 32 -1 114 35 -1 108 38 -1 100 41 -1 33 0 0 -1
Cat program
-1 2 0 2 -1 1 5 8 0