OverviewRASP(Random Access Stored Program) machine implementation on Ruby. Can be used for launching and tracing RASP programs (for example, in academic purposes ;).
How to useCreate a file with your code, for example:
write 0Type incoming tape info into `input.txt':
42Execute ruby go.rb p.ram to launch it. Result will be written to `output.txt'.
fourdmac:rubyrasp fourdman$ ruby go.rb p.ram
[nil, 2, 0, 3, 0]
fourdmac:rubyrasp fourdman$ cat output.txt
42 You can find trace log in log.txt:
=> _read ( 0 ) , pc = 1, memory = [, 2, 0, 3, 0]
=> _write ( 0 ) , pc = 3, memory = [42, 2, 0, 3, 0]
Instruction setCurrently the following set of instructions are supported:
load store read write add mult sub div jump jzero jgtz halt Please refer to code or examples for a full syntax description(it's a TODO).
Examplestest.ram — just read/write pair printme.ram — prints it's own code
Use Patent Claims
Include Install Instructions
These details are provided for information only. No information here is legal advice and should not be used as such.