Fibonacci Computer : Ruby

Code

Controls
Memories
Ref
MOV [source], [destination] # mov source to destination
ADD [source], [destination] # add source to destination
SUB [source], [destination] # sub destination by source
MUL [source], [destination] # multiply destination with source
DIV [source], [destination] # divide destination by source, note that if you divide by zero, the result would be zero.
INC [destination] # increase by one
DEC [destination] # decrease by one
CMP [a], [b] # b - a -> FLAG
J [tag] # jl if FLAG < 0, je if =
PUSH [value] # push value to stack
HALT # do nothing
About
This project was originally from my computer class, which is called Fibonacci Computer. However, in the class, the teacher only told us that we, human should perform the assemble-like code, which I thought was terrible.
Therefore, I made this toy machine to help me with those codes. And because the original one does not support many features a real computer would have, so I made a few changes on it.
If you want to use the original version, please see my old one.
And I'm working on a compiler for it.
Author: 凉凉