Xjansk
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
Xjansk is a stack-based esoteric programming language under construction by DanielE (talk). It uses the following commands:
command | description |
---|---|
x | cheks if top value of the stack is 0 or not. If it is 0, the pointer skips the next command. |
k | lets the code between k and k[space] loop forever. |
j | gets input from user and translates the characters to their corresponding ASCII values. |
j[space] | same as j, but only 1 character |
nj | same as j[space], but only numbers |
n[space] | adds top 2 values |
nn[space] | subtracts top value of value beneath it |
nnn[space] | multiplies |
nnnn[space] | divides |
s | prints top value |
s[space] | prints top value as an ASCII value. |
s[space][space] | pops top value |
a | duplicates top value |
a[space] | places bottom value on top of the stack |
(number) | pushes that number on top of the stack |
(char) | pushes that character on top of the stack |
Program examples
Hello world
Simple version:
72s 101s 108as s 111s (NOT correct and must be updated)
Cat program
jka xs
This should probably work as a cat program.
Truth machine
njxks
This should (again) probably work as a Truth machine. nj takes one character as input from the user. If it is 0, it prints that character and ends. If it is 1 or not 0, it will print itself forever with the k command.
square
njannn s
More information follows.