MacroMachines / mac

virtual machine in c

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAC

MAC is a really simple virtual machine. It's written in C and is [as of writing this] only one small C file.

Blog Post!

Check out the improved version to see an implementation of more instructions, registers, etc...

I've also ported this to my own programming language, Ark. Check it out!

Instructions

op   val    usage    			function
---------------------------------------------------------------------
HLT  0      hlt 	 			halts program
PSH  1      psh val  			pushes <val> to stack
POP  2      pop 	 			pops value from stack
ADD  3      add 	 			adds top two vals on stack

About

virtual machine in c


Languages

Language:C 98.5%Language:Makefile 1.5%