Home | AI | Physics | Mathematics | Compiler Design | Games | Downloads | About Me
You are visitor number 300936 since February 2003
Download
Introduction
Simpletron VM
Small Pascal
JPascal
 
Free Books


Simpletron Virtual Machine

In 1997 I started teaching myself C, C++ and Java. I finished learning the C language after a month and decided to go into the most interesting exercises found in the book I was reading (C How to Program, by Deitel & Deitel). One of this exercises was the implementation of a virtual computer to which they called the Simpletron. I wrote down the opcodes they had provided and added two new opcodes to read from the accumulator and to write to output from the accumulator. The memory size of the machine is limited to 500 words.

I implemented this very simple virtual machine just to test my early compilers. I will use it in some of the tutorials that I am going to provide on compiler design and I may extend it to provide a more complete set of instructions. Maybe, I will implement the whole instruction set of the 8086 CPU.

Feel free to modify this file as you like. If you have any queries, please do not hesitate to contact me.

Download the source code from here or a Mac OS X binary from here.

Best Regards

Fidel.


Books



© 2002, 2003 Fidel Viegas. All rights reserved.