News for hackers. Stuff that matters.
Re:Show HN: A small virtual machine written in C by tekknolagi on Monday August 04, 2014 @04:29AM (#8130809)
So I started off following this (http://en.wikibooks.org/wiki/Creating_a_Virtual_Machine/Regi...) which was interesting but clearly never super influential in my design (except in earlier stages, but that died).

Then I read this: http://stackoverflow.com/questions/2034422/tutorial-resource...

and this: http://courses.cms.caltech.edu/cs11/material/c/mike/lab8/lab...

and took a look at the MSP430's instruction set.

As far as where they can be used... anywhere? I don't know the answer to your question - sorry :)

Re:Show HN: A small virtual machine written in C by VLM on Monday August 04, 2014 @10:09AM (#8131776)
"and took a look at the MSP430's instruction set."

I wonder in a general sense if there are many VMs that explicitly copy good older CPUs. I've always thought the 6809 would make an awesome VM. After all, it was pretty awesome to code on in the real world. Or a VM based on the classic 1802, 6502, or Z80 with some minor mods.

If you really want to warp peoples minds give them a VM based on IBM HAL assembler, basically turn Hercules and VM into a hypervisor rather than an application.

A PDP-11 inspired/based virtual machine. Hmm.

Re:Show HN: A small virtual machine written in C by astrobe_ on Monday August 04, 2014 @12:10PM (#8132444)
CISC would be better than RISC because one should keep in mind that for many operation most of the execution time is VM overhead.

But if you want performance you'd rather tailor your instruction set to the language it will execute (assuming you're not making a general purpose VM). CPU makers like Intel do actually keep a close look on what programs are doing in order to evolve their instruction set.

Re:Show HN: A small virtual machine written in C by manish_gill on Monday August 04, 2014 @04:34AM (#8130827)
Thanks for all those links!