Eco
Jump to navigation
Jump to search
Eco is a stack-based esoteric programming language that was made by User:Notxnorand on March 27 2026
Commands
| Command | Description |
|---|---|
PUSH X |
Pushes a specified value onto the stack. |
POP |
Pops the top value off the stack. |
PRTINT |
Pops the top value off the stack and prints it as an integer. |
PRTCHR |
Pops the top value off the stack and prints it as its ASCII value. |
INTIN |
Retrieves an integer from the user and pushes it onto the stack, pushing 0 as a fallback. |
CHRIN |
Retrieves an ASCII character from the user and pushes it onto the stack, pushing 0 as a fallback. |
DUP |
Duplicates the top value onto the stack. |
IF |
Skips the next command if the top value on the stack is 0, doesn't pop. |
GOTO X |
Jumps to the specified line number, 1-indexed. |
REV |
Swaps the top 2 values on the stack. |
FETCH X |
Pops the value relative to the top of the stack and pushes it to the top. |
ADD |
Pops the top 2 values on the stack, adds them, and pushes the result. |
SUB |
Pops the top 2 values from the stack, subtracts them, taking the top from the second, and pushes the result. |
MUL |
Pops the top 2 values on the stack, multiplies them, and pushes the result. |
DIV |
Pops the top 2 values on the stack, with the top value dividing the second, and pushes the result. |
EQL |
Pops the top 2 values on the stack, if they are equal, push 1, else push 0. |
Every command requires an operand, or a dummy operand, for those without one. Anything following a # (with a preceding space) is ignored. Comments can also be placed directly after an operand.