Re:TinyVM – A small and easy to understand virtual machine in C
by lmitchell on Saturday March 17, 2018 @05:44PM
(#16609228)
I dunno, I find it pretty easy to understand... seems like the main instruction loop is in tvm.c, in the function tvm_vm_run(), which is exactly the first place I looked and seems totally sensible to me.
[ Parent
| on HN ]
Re:TinyVM – A small and easy to understand virtual machine in C
by spc476 on Saturday March 17, 2018 @06:03PM
(#16609284)
Compare that to my 6809 emulator [1]. I have a mc6809_run() function that is pretty much the same, but mc6809_step() is in the same file and not hidden in a header file. There also seems to be a lack of memory operations (like reading or writing) other than PUSH/POP.
[1] https://github.com/spc476/mc6809 [2]
[2] Yes, it lacks a README. I know.