New page wikitext, after the edit (new_wikitext) | ''''Bosol''' is an esoteric programming language designed by [[YourUsername]] 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 ===
* <code>+A++</code> – Increment A by 1.
* <code>-A--</code> – 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:
* <code>+AR+</code> – A = A + R
* <code>-AR-</code> – A = A - R
* <code>*AR*</code> – A = A * R
* <code>/AR/</code> – A = A / R
=== Assignment ===
* <code>=AR=</code> – Assign R to A. Works only on A, R, X, Y, and P.
== Input / Output ==
=== Input ===
* <code>=AI=</code> – Input integer to A.
* <code>@AI@</code> – Input ASCII character to A (converted to integer).
* <code>@LI@</code> – Input string to L (converted to list of ASCII integers).
=== Output ===
*(D cannot be used for output)*
* <code>prtA</code> – Print integer value of A.
* <code>ascA</code> – Print ASCII character corresponding to value in A.
== Stack and List Operations ==
=== Stack D ===
* <code>PXD</code> – Push X to D.
* <code>PYD</code> – Push Y to D.
=== List L ===
* <code>+LR+</code> – Add R to L.
* <code>-LR-</code> – Remove all items from L that equal R.
== Flow Control ==
* <code>==AR==</code> – Execute next line only if A == R.
* <code>=<AR<=</code> – Execute next line only if A > R.
'''Note:''' P automatically increments after each line.
e.g., line 3 with <code>+AP+</code> sets A = A + 4.
== Errors ==
* <code>Booooo</code> – General error.
* <code>SOOOOOO BOOOOOO {line}</code> – Unknown or invalid command at given line.
== Examples ==
=== Print ASCII Character ===
<pre>
+A++ # A = 1
+A++ # A = 2
*AA* # A = 4
*AA* # A = 16
*AP* # A = 64
+A++ # A = 65
ascA # Output: A
</pre>
=== Truth Machine ===
<pre>
=AI=
+D++
+D++
*DD*
==AR==
+PD+
+R++
prtR
-P--
prtR
</pre>
=== Cat Program ===
<pre>
@LI@
ascL
=PA=
</pre>
== External Links ==
[https://github.com/zurek4320/Bosol GitHub repository]
[[Category:Languages]]
[[Category:2025]]' |
Lines added in edit (added_lines) | [
0 => ''''Bosol''' is an esoteric programming language designed by [[YourUsername]] 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.',
1 => '',
2 => '== Overview ==',
3 => '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.',
4 => '',
5 => '== Registers and Data Structures ==',
6 => '',
7 => '=== Registers ===',
8 => '* '''A''' – General-purpose register. Accepts character or integer input.',
9 => '* '''R''' – Temporary register. Used for arithmetic or to manipulate list '''L'''.',
10 => '* '''X''', '''Y''' – Registers used only with stack '''D'''.',
11 => '* '''P''' – Program counter. Changing it will jump to another line (used for loops and conditional execution).',
12 => '',
13 => '=== Stacks / Lists ===',
14 => '* '''D''' – A "mini" stack that holds up to 2 items. Works only with X and Y. Items are popped on use.',
15 => '* '''L''' – A general-purpose list that can be manipulated using register '''R'''.',
16 => '',
17 => '== Commands ==',
18 => '',
19 => '=== Unary Operations ===',
20 => '* <code>+A++</code> – Increment A by 1.',
21 => '* <code>-A--</code> – Decrement A by 1 (or delete item with highest index if used on a list).',
22 => '',
23 => '=== Binary Arithmetic ===',
24 => 'If second operand is '''D''', the top item is popped and used:',
25 => '* <code>+AR+</code> – A = A + R',
26 => '* <code>-AR-</code> – A = A - R',
27 => '* <code>*AR*</code> – A = A * R',
28 => '* <code>/AR/</code> – A = A / R',
29 => '',
30 => '=== Assignment ===',
31 => '* <code>=AR=</code> – Assign R to A. Works only on A, R, X, Y, and P.',
32 => '',
33 => '== Input / Output ==',
34 => '',
35 => '=== Input ===',
36 => '* <code>=AI=</code> – Input integer to A.',
37 => '* <code>@AI@</code> – Input ASCII character to A (converted to integer).',
38 => '* <code>@LI@</code> – Input string to L (converted to list of ASCII integers).',
39 => '',
40 => '=== Output ===',
41 => '*(D cannot be used for output)*',
42 => '* <code>prtA</code> – Print integer value of A.',
43 => '* <code>ascA</code> – Print ASCII character corresponding to value in A.',
44 => '',
45 => '== Stack and List Operations ==',
46 => '',
47 => '=== Stack D ===',
48 => '* <code>PXD</code> – Push X to D.',
49 => '* <code>PYD</code> – Push Y to D.',
50 => '',
51 => '=== List L ===',
52 => '* <code>+LR+</code> – Add R to L.',
53 => '* <code>-LR-</code> – Remove all items from L that equal R.',
54 => '',
55 => '== Flow Control ==',
56 => '* <code>==AR==</code> – Execute next line only if A == R.',
57 => '* <code>=<AR<=</code> – Execute next line only if A > R.',
58 => '',
59 => ''''Note:''' P automatically increments after each line. ',
60 => 'e.g., line 3 with <code>+AP+</code> sets A = A + 4.',
61 => '',
62 => '== Errors ==',
63 => '* <code>Booooo</code> – General error.',
64 => '* <code>SOOOOOO BOOOOOO {line}</code> – Unknown or invalid command at given line.',
65 => '',
66 => '== Examples ==',
67 => '',
68 => '=== Print ASCII Character ===',
69 => '<pre>',
70 => '+A++ # A = 1',
71 => '+A++ # A = 2',
72 => '*AA* # A = 4',
73 => '*AA* # A = 16',
74 => '*AP* # A = 64',
75 => '+A++ # A = 65',
76 => 'ascA # Output: A',
77 => '</pre>',
78 => '',
79 => '=== Truth Machine ===',
80 => '<pre>',
81 => '=AI=',
82 => '+D++',
83 => '+D++',
84 => '*DD*',
85 => '',
86 => '==AR==',
87 => '+PD+',
88 => '+R++',
89 => 'prtR',
90 => '-P--',
91 => 'prtR',
92 => '</pre>',
93 => '=== Cat Program ===',
94 => '<pre>',
95 => '@LI@',
96 => 'ascL',
97 => '=PA=',
98 => '</pre>',
99 => '== External Links ==',
100 => ' [https://github.com/zurek4320/Bosol GitHub repository]',
101 => '',
102 => '[[Category:Languages]]',
103 => '[[Category:2025]]'
] |