Uncomment
Jump to navigation
Jump to search
Uncomment is an esoteric programming language created by user:Okohokonu in 2009. It uses two commands; numbers from 0 to 255 in hexadecimal, and "x."
Stack-pushing
The hexadecimal number in the program is pushed to the stack, so:
010203040a
pushes 1, then 2, then 3, then 4, then 10 to the stack.
Function execution
The character "x" executes the function using the value on top of the stack.
Function list
Function Number | Parameters | What it Does |
---|---|---|
0 | x | Exits with exit code x |
1 | x , y | If x is 0, then prints y to standard output as a character. If x is 1, y is printed as an integer. |
2 | x, y | Pops x and y from the stack and pushes their sum. |
3 | x, y | Pops x and y from the stack and pushes x - y. |
4 | x, y | Pops x and y from the stack and returns x * y. |
5 | x, y, z | If x is 0, pushes integer divide y / z. If x is 1, pushes y % z. |
6 | x, y | If x > y, pushes 1. Otherwise, pushes 0. |
7 | x, y | Same as above, but x < y. |
8 | x, y | Same as above; x >= y. |
9 | x, y | Same as above; x <= y. |
10 | x, y | Same as above; x is equal to y. |
11 | x, y | Same as above; x is not equal to y. |
12 | x | If x is 0, inputs a character, pushing the character code of the character onto the stack. If x is 1, does the same thing, but if a pure integer is input, the value of the integer is pushed to the stack. More than one character is reversed and pushed to the stack. |
13 | x | If statement. Top value on the stack is used, where 1 is true and 0 is false. |
14 | -- | Ends the innermost if statement. |
15 | x | Makes a label with "name" x. This means that only 256 labels can be made total. |
16 | x | Goto statement. Directs program execution to label with "name" x. |
Note that "x" pops the first value on the stack and runs that function. X is the first value on the stack, y is the second, and z is the third. X, y, and z are all popped when the function is called, depending on what function is used.
External resources
- A Python interpreter for Uncomment.