Posted By: wraggster
asiekierka posted this:
subleqDS
Subleq DS is a mod of original subleq.
Subleq consists of just one command "subtract and branch(jump) if negative or zero)
Each subleq command consists of 3 words: a, b and c.
a, b and c are memory addresses.
If b - a is negative or zero, jump to c. Otherwise, go to the next command.
The code IS in the memory, so Subleq DS is self-modyfing.
Special memory addresses are addresses that don't execute subleq; instead, they execute
a command they're made to do. The addresses are put to b.
Command positions:
-1 - outputs a. (in relative mode it's still -1, but it shouldn't be a problem)
Limitations:
- 512kb of memory (thus, up to 512kb of code)
- Speed (fix the source code if you want it faster)
Well, if you think this is slow, I'd like to tell you that it uses 15 vblanks,
because only then you can see the results pretty fast.
If you still think it's slow, check the source.
How to use
1) DLDI patch subleqDS.nds
2) Put it on your flashcart device.
3) Put "test.slq" (a subleq file) in the root of your flashcart device.
Changes:
Quote:
0.2:
- removed test code
- fixed a bug or two
0.1:
- first release
- do not use it, or do not even download it
Controls:
B - switch between silent mode (only output is shown on the screen) and
debug mode (everything is shown).
Start - pause/unpause.
Download and Give Feedback Via Comments