Five

From Esolang
Jump to navigation Jump to search

Five ia an esoteric programming language created by Andrew Bayly in 2023.

Five is a OISC. The one instruction has one parameter, meaning that the syntax for Five is nothing more that a sequence of integers which are references to memory cells.

Opcode

Opcodes
Opcode parameters action
n/a a retrieve bit from memory cell a, and bit from register q. Combine with NAND. Write result back to a and back to q.

Implicit loop

There is no explicit loop construct in Five. Rather, the sequence of instructions repeats continuously until it is instructed to halt.

Input/Output

At the end of the loop (subject to change?), the check-bits are checked. If Input is checked, then a single 16-bit value is read into the input byte (and Input is cleared). If Output is checked, then a single byte is written out from the Output byte (and Output is cleared). If Halt is checked, then the program halts, otherwise it loops back to the start.

Memory Mapping

Syntax

Comments are allowed in Five. On each line, everything following the first ; is ignored. Otherwise, Five syntax consists only of a sequence of integers separated by space. Each integer is an instruction where the integer is the value of parameter a.

Example programs

TODO: