Posted By: wraggster
News/release from asiekierka
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.
-1 - outputs a.
- 64kb of memory (thus, up to 64kb 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.
B - switch between silent mode (only output is shown on the screen) and
debug mode (everything is shown).
Q: Can you implement an (put any real CPU here)?
A: No. I want to do fun things.
Q: Why is it so slow?
A: Go and check the source code.
Q: Can you add (some feature)?
A: Go and implement it yourself, you have source.
Q: This sucks!
A: Do any better from scratch and I'll agree.
Download and Give Feedback Via Comments