do-runtime
This is an open source for the minimalist machine language Do.
Do is a fictive machine language that reads, writes and jumps on a tape, working like a Turing machine. Read more about Do.
Example
Let's assume you have the following Do code.
0 0 0 0 0 0 0 0 0 0 // read from 0
0 1 0 0 0 0 1 0 1 1 // write to 11
1 0 1 1 1 1 1 1 1 1 // jump to the end
To execute it, load the runtime and initialize a new instance.
var DoRuntime = ; var r = Object;
You have to pass the tape as an array of numbers. The second parameters is an optional options
object.
r;
When you call run
, the Do runtime will execute the program until it jumps to the end of the tape (or beyond).
Install
npm install do-runtime
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.