++===
++=== is a register-based OISC with no branching. The name is a concatenation of ++
, ==
, and =
, describing the singular instruction (if (*A++ == *B) *A = *C;
).
Specification
Memory in ++=== consists of indefinitely many registers containing non-negative integers initialized at 0, though only finitely many can be used in the program.
Programs consist of commands, each naming three distinct registers A, B, and C. The command, when executed, first increments A. After incrementing, if A is equal to B, A is set to C. It is undefined behavior if A, B and C are not distinct. At the end of the program, the program restarts at the first command.
No explicit halting condition or I/O extension is currently defined.
Syntax
If syntax is required, registers are named by strings containing no whitespace. Commands are specified as <register name><whitespace><register name><whitespace><register name>
, and are separated by whitespace. Incomplete commands may only appear at the end and are ignored. For readability, non-empty alphanumeric register names, spaces within commands, and newlines separating commands are recommended, however programs consisting of (for example) only zero-width spaces, zero-width non-joiners, and zero-width joiners are also valid.