Jump to content

Writing a virtual machine


WarFox
 Share

Recommended Posts

A cool article I have been slowly working through between projects. The link is a guide to writing a virtual CPU. The design here is lc3, which was a purely academic design used for teaching students and as far as I am aware, no real hardware implementation. Once I fully work through this, I am toying with the idea of writing a virtual CPU for RISC-V or PowerPC/Power10.

 

https://github.com/justinmeiners/lc3-vm

Link to comment
Share on other sites

Impressive that the final code is about 250 lines of C. This looks intriguing, I'd love to see any progress you make on writing a virtual CPU.

Link to comment
Share on other sites

That may be a winter break project. I've love to target PowerPC, not the recent Power iterations. Reason being is that iBook G4 I have, I picked it up specifically to play with assembly on it and potentially write an OS for. Implementing the PPC ISA may make it a little easier to handle the assembly bits of an OS for that machine.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...