Cortex language 3A
Jump to navigation
Jump to search
Cortex language 3A is an esolang by User:PythonshellDebugwindow that follows the specifications of a Cortex language 3.
Memory model
Cortex language 3A uses a tape of 16 arbitrary-size unsigned integers. The current cell is the cell pointed to by the cell pointer. The cell pointer wraps around the tape.
Syntax
Same as brainfuck, e.g. each character is its own command that takes no arguments and returns no value. The one exception to this rule is the ;
command, whose result depends on the following character(s).
Commands
Command | Effect | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
& |
Increment the current cell | ||||||||||||||||||||||||||||||||||||||||
' |
If the current cell is zero, jump to the matching :
| ||||||||||||||||||||||||||||||||||||||||
* |
Square the current cell | ||||||||||||||||||||||||||||||||||||||||
~ |
Increment the cell pointer | ||||||||||||||||||||||||||||||||||||||||
$ |
Decrement the current cell (raises an error if cell == 0) | ||||||||||||||||||||||||||||||||||||||||
: |
If the current cell is nonzero, jump back to the matching '
| ||||||||||||||||||||||||||||||||||||||||
[ |
Output the Unicode character of the current cell | ||||||||||||||||||||||||||||||||||||||||
] |
Input an unsigned base-3 integer to the current cell | ||||||||||||||||||||||||||||||||||||||||
; |
Depends on the next instruction:
|
All others are ignored. Sequences like ;X
and ;;X
are also ignored.
Examples
;&
;'
Cat:
;;&
ROT13 encoder/decoder for user input:
;*
And so on.
Turing-completeness
Through prime factorization of the tape, as well as unbounded looping using '
and :
, Cortex language 3A is Turing-complete.