Virtual machine vaguely inspired on the JVM. Accepts .ere files and generates bytecode to be interpreted and ran on the Eric VM. Bytecode is ran on the VM as a stack based program.
Add two numbers
iconst 10
iconst 10
iadd
print
> 20Function calls
iconst 100
call_to 1 1
halt
local 0
iconst 10
iadd
print
ret 0
> 110iconst: load integer on the stackiadd: add to last numbers on the stack as integersprint: print last value on the stackcall: move instruction pointer to location in the bytecodecall_to: move instruction pointer relative to location of a call in the bytecoderet: return from function callhalt: end programlocal: load function arguments on the stackif_cmp_eq: move to location if last two values are equalrcpy: copy register value to stackscpy: copy value on the stack to a register