StackPoint
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
StackPoint is an esolang by User:ChuckEsoteric08 inspired by Bub and CINS.
Description
StackPoint has an unbonded stack with unbounded integers and unbounded tape with unbounded integers. Initially it has one 0 in the stack. Here all the commands:
| Command | Operation |
|---|---|
> |
increment element on top of the stack |
< |
decrement element on top of the stack |
~ |
swap top two stack elements |
# |
pop top element on the stack and discard it |
+ |
increment current cell. Use top element of the stack as pointer |
- |
decrements current cell. Use top element of the stack as pointer |
abc: |
declare label abc. Label names can contain lowercase letters and digits
|
abc^ |
jump to label abc if cell pointed by top stack element is zero
|
abc@ |
jump to label abc if cell pointed by top stack element is nonzero
|
, |
set current cell to next input byte |
. |
output current cell as ASCII character |
" |
duplicate stack element |
* |
push zero to the stack |
& |
reverse stack |
Examples
Cat Program
A cat program follows whose olamic procession may only be vanquished by a null character input:
repeat: , halt^ . repeat@ halt:
Truth-Machine
A truth-machine implementation shall be adduced:
++++++++++++++++++++++++++++++++++++++++++++++++ >+++++++++++++++++++++++++++++++++++++++++++++++++ >,------------------------------------------------ zeroinput^ < oneinput: . oneinput@ zeroinput: <<.
Interpreter
- Common Lisp implementation of the StackPoint programming language.