New page wikitext, after the edit (new_wikitext) | '[https://codeberg.org/WinFan3672/JAJL JAJL] is an esolang created by [[User:Gordinator]]. Its standard implementation is written in Python, but an official variant, JAJL-CS, is written in C#.
JAJL is designed to be simple to write a compiler or interpreter, simple to conceptualise, and also encourages the creation of self-obfuscating programs.
== How JAJL Works ==
JAJL is a programming language that requires you to change the values of ''memory addresses'' using ''instructions''. Some of these memory addresses can work with the ''stack'', or the ''string buffer'', or other pre-determined memory addresses.
=== Memory Addresses ===
JAJL can work with memory addresses from values 0000 to ffff, each of which can either be unallocated or contain data.
=== The Stack ===
The Stack is a special location where memory addresses can be transferred. Data is "pushed" to the stack from a memory address, and "popped" to a memory address. However, unlike a CPU ISA, the stack isn't an actual stack, but instead is a memory address outside of memory.
=== Functions ===
Functions work exactly as they do in other programming languages. They are defined using ''func <addr>'', and functions are ended with ''endf''.
=== Data Types ===
* Unallocated
Must be allocated to be used.
* Integer
Value can range from 0 to 63336.
* Signed Integer
Value can from -65536 to 65536.
== Instruction Set ==
* int <addr>
Creates an integer with value 0 at address <addr>.
* inc <addr>
Sets the value of <addr> to the value of <addr>+1.
* dec <addr>
Sets the value of <addr> to the value of <addr>-1.
* incb <addr>
Sets the value of <addr> to the value of address 00ab + 1.
* decb <addr>
Sets the value of <addr> to the value of address 00ab - 1.
* del <addr>
Deletes memory address <addr>.
* sbfr
Converts the value of address aaaa into an ASCII character and appends that character to the string buffer.
* prnt
Prints the contents of the string buffer to STDOUT.
* sclr
Clears the string buffer.
* push <addr>
Sets the value of the stack to the value of the stack + the value of <addr>.
* pop <addr>
Sets the value of <addr> to the value of <addr> + the value of the stack.
* pnt <addr>
Sets the pointer to <addr>.
* free
Sets the pointer to the first unallocated address.
* func <addr>
Defines a function at <addr>. All lines after the func definition are part of the function and are not executed.
* endf
Ends the function definition. The function is "compiled" and can be run.
* call <addr>
Call the function at address <addr>.
== 'Hello World' ==
<pre>
; Hello world program
; (c) 2023 WinFan3672, some rights reserved.
; Licenced under GNU GPL2-only.
inc 00ab
push 00ab
pop 00ab
pop 00ab
inc 00ab
rstk
incb aaaa
sbfr ; H
push 00ab
pop fffe
push 00ab
push 00ab
pop 00ab
inc 00ab
incb aaaa
sbfr ; e
rstk
push fffe
int 00ab
pop 00ab
incb aaaa
sbfr ; l
sbfr ; l
rstk
push aaaa
pop efff
inc aaaa
inc aaaa
inc aaaa
rstk
push aaaa
pop effd
sbfr ; 0
rstk
push aaaa
pop ffff
rstk
int bbbb
inc bbbb
push bbbb
push bbbb
int bbbb
pop bbbb
push bbbb
int bbbb
pop bbbb
push bbbb
int bbbb
pop bbbb
push bbbb
int bbbb
pop bbbb
push bbbb
int bbbb
pop bbbb
int aaaa
pop aaaa
sbfr ; space
rstk
int aaaa
push ffff
push fffe
pop aaaa
inc aaaa
sbfr ; w
rstk
push effd
int aaaa
pop aaaa
sbfr ; o
inc aaaa
inc aaaa
inc aaaa
sbfr ; r
rstk
push ffff
int aaaa
pop aaaa
dec aaaa
dec aaaa
dec aaaa
sbfr ; l
inc 00ab
decb aaaa
sbfr ; d
inc bbbb
rstk
push bbbb
int aaaa
pop aaaa
sbfr ; !
prnt ; prints contents of string buffer
</pre>' |
Lines added in edit (added_lines) | [
0 => '[https://codeberg.org/WinFan3672/JAJL JAJL] is an esolang created by [[User:Gordinator]]. Its standard implementation is written in Python, but an official variant, JAJL-CS, is written in C#.',
1 => '',
2 => 'JAJL is designed to be simple to write a compiler or interpreter, simple to conceptualise, and also encourages the creation of self-obfuscating programs.',
3 => '',
4 => '== How JAJL Works ==',
5 => 'JAJL is a programming language that requires you to change the values of ''memory addresses'' using ''instructions''. Some of these memory addresses can work with the ''stack'', or the ''string buffer'', or other pre-determined memory addresses.',
6 => '',
7 => '=== Memory Addresses ===',
8 => 'JAJL can work with memory addresses from values 0000 to ffff, each of which can either be unallocated or contain data.',
9 => '',
10 => '=== The Stack ===',
11 => 'The Stack is a special location where memory addresses can be transferred. Data is "pushed" to the stack from a memory address, and "popped" to a memory address. However, unlike a CPU ISA, the stack isn't an actual stack, but instead is a memory address outside of memory.',
12 => '=== Functions ===',
13 => 'Functions work exactly as they do in other programming languages. They are defined using ''func <addr>'', and functions are ended with ''endf''.',
14 => '=== Data Types ===',
15 => '* Unallocated',
16 => 'Must be allocated to be used.',
17 => '* Integer',
18 => 'Value can range from 0 to 63336.',
19 => '* Signed Integer',
20 => 'Value can from -65536 to 65536.',
21 => '',
22 => '== Instruction Set == ',
23 => '* int <addr>',
24 => 'Creates an integer with value 0 at address <addr>.',
25 => '* inc <addr>',
26 => 'Sets the value of <addr> to the value of <addr>+1.',
27 => '* dec <addr>',
28 => 'Sets the value of <addr> to the value of <addr>-1.',
29 => '* incb <addr>',
30 => 'Sets the value of <addr> to the value of address 00ab + 1.',
31 => '* decb <addr>',
32 => 'Sets the value of <addr> to the value of address 00ab - 1.',
33 => '* del <addr>',
34 => 'Deletes memory address <addr>.',
35 => '* sbfr',
36 => 'Converts the value of address aaaa into an ASCII character and appends that character to the string buffer.',
37 => '* prnt',
38 => 'Prints the contents of the string buffer to STDOUT.',
39 => '* sclr',
40 => 'Clears the string buffer.',
41 => '* push <addr>',
42 => 'Sets the value of the stack to the value of the stack + the value of <addr>.',
43 => '* pop <addr>',
44 => 'Sets the value of <addr> to the value of <addr> + the value of the stack.',
45 => '* pnt <addr>',
46 => 'Sets the pointer to <addr>.',
47 => '* free',
48 => 'Sets the pointer to the first unallocated address.',
49 => '* func <addr>',
50 => 'Defines a function at <addr>. All lines after the func definition are part of the function and are not executed.',
51 => '* endf',
52 => 'Ends the function definition. The function is "compiled" and can be run.',
53 => '* call <addr>',
54 => 'Call the function at address <addr>.',
55 => '== 'Hello World' ==',
56 => '<pre>',
57 => '; Hello world program',
58 => '; (c) 2023 WinFan3672, some rights reserved.',
59 => '; Licenced under GNU GPL2-only.',
60 => '',
61 => 'inc 00ab',
62 => 'push 00ab',
63 => 'pop 00ab',
64 => 'pop 00ab',
65 => 'inc 00ab',
66 => 'rstk',
67 => 'incb aaaa',
68 => 'sbfr ; H',
69 => '',
70 => 'push 00ab',
71 => 'pop fffe',
72 => 'push 00ab',
73 => 'push 00ab',
74 => 'pop 00ab',
75 => 'inc 00ab',
76 => 'incb aaaa',
77 => 'sbfr ; e',
78 => '',
79 => 'rstk',
80 => 'push fffe',
81 => 'int 00ab',
82 => 'pop 00ab',
83 => 'incb aaaa',
84 => 'sbfr ; l',
85 => 'sbfr ; l',
86 => 'rstk',
87 => 'push aaaa',
88 => 'pop efff',
89 => '',
90 => 'inc aaaa',
91 => 'inc aaaa',
92 => 'inc aaaa',
93 => 'rstk',
94 => 'push aaaa',
95 => 'pop effd',
96 => 'sbfr ; 0',
97 => '',
98 => 'rstk',
99 => 'push aaaa',
100 => 'pop ffff',
101 => 'rstk',
102 => 'int bbbb',
103 => 'inc bbbb',
104 => 'push bbbb',
105 => 'push bbbb',
106 => 'int bbbb',
107 => 'pop bbbb',
108 => 'push bbbb',
109 => 'int bbbb',
110 => 'pop bbbb',
111 => 'push bbbb',
112 => 'int bbbb',
113 => 'pop bbbb',
114 => 'push bbbb',
115 => 'int bbbb',
116 => 'pop bbbb',
117 => 'push bbbb',
118 => 'int bbbb',
119 => 'pop bbbb',
120 => 'int aaaa',
121 => 'pop aaaa',
122 => 'sbfr ; space',
123 => '',
124 => 'rstk',
125 => 'int aaaa',
126 => 'push ffff',
127 => 'push fffe',
128 => 'pop aaaa',
129 => 'inc aaaa',
130 => 'sbfr ; w',
131 => '',
132 => 'rstk',
133 => 'push effd',
134 => 'int aaaa',
135 => 'pop aaaa',
136 => 'sbfr ; o',
137 => '',
138 => 'inc aaaa',
139 => 'inc aaaa',
140 => 'inc aaaa',
141 => 'sbfr ; r',
142 => '',
143 => 'rstk',
144 => 'push ffff',
145 => 'int aaaa',
146 => 'pop aaaa',
147 => 'dec aaaa',
148 => 'dec aaaa',
149 => 'dec aaaa',
150 => 'sbfr ; l',
151 => '',
152 => 'inc 00ab',
153 => 'decb aaaa',
154 => 'sbfr ; d',
155 => '',
156 => 'inc bbbb',
157 => 'rstk',
158 => 'push bbbb',
159 => 'int aaaa',
160 => 'pop aaaa',
161 => 'sbfr ; !',
162 => '',
163 => 'prnt ; prints contents of string buffer',
164 => '</pre>'
] |