"Bosol"
Jump to navigation
Jump to search
Bosol is an esoteric programming language designed by User:Zurek in 2025. It features a compact set of registers and minimalistic stack and list operations, with a focus on character manipulation and simple flow control.
Overview
Bosol uses a small number of registers and two data structures (a stack and a list) to perform computations. It is designed for simplicity, experimentation, and a degree of obfuscation typical of esoteric languages.
Registers and Data Structures
Registers
- A – General-purpose register. Accepts character or integer input.
- R – Temporary register. Used for arithmetic or to manipulate list L.
- X, Y – Registers used only with stack D.
- P – Program counter. Changing it will jump to another line (used for loops and conditional execution).
Stacks / Lists
- D – A "mini" stack that holds up to 2 items. Works only with X and Y. Items are popped on use.
- L – A general-purpose list that can be manipulated using register R.
Commands
Unary Operations
+A++
– Increment A by 1.-A--
– Decrement A by 1 (or delete item with highest index if used on a list).
Binary Arithmetic
If second operand is D, the top item is popped and used:
+AR+
– A = A + R-AR-
– A = A - R*AR*
– A = A * R/AR/
– A = A / R
Assignment
=AR=
– Assign R to A. Works only on A, R, X, Y, and P.
Input / Output
Input
=AI=
– Input integer to A.@AI@
– Input ASCII character to A (converted to integer).@LI@
– Input string to L (converted to list of ASCII integers).
Output
- (D cannot be used for output)*
prtA
– Print integer value of A.ascA
– Print ASCII character corresponding to value in A.
Stack and List Operations
Stack D
PXD
– Push X to D.PYD
– Push Y to D.
List L
+LR+
– Add R to L.-LR-
– Remove all items from L that equal R.
Flow Control
==AR==
– Execute next line only if A == R.=<AR<=
– Execute next line only if A > R.
Note: P automatically increments after each line.
e.g., line 3 with +AP+
sets A = A + 4.
Errors
Booooo
– General error.SOOOOOO BOOOOOO {line}
– Unknown or invalid command at given line.
Examples
Print ASCII Character
+A++ # A = 1 +A++ # A = 2 *AA* # A = 4 *AA* # A = 16 *AP* # A = 64 +A++ # A = 65 ascA # Output: A
Truth Machine
=AI= +D++ +D++ *DD* ==AR== +PD+ +R++ prtR -P-- prtR
Cat Program
@LI@ ascL =PA=
External Links
GitHub repository