Virtual Machine and Byte-Code

C

Chris Cranford

Can someone point me in the direction of resources, existing classes, or open
source examples which illustrate writing a virtual machine environment in
C/C++...

My goal is to write a complete basic-language byte-code compiler in C++ to
write compressed byte-code images in a specified format that later can be
loaded by a virtual machine in C++ to execute each byte-code/op-code in
memory.

Thanks,
Chris
---
 
K

Karl Heinz Buchegger

Chris said:
Can someone point me in the direction of resources, existing classes, or open
source examples which illustrate writing a virtual machine environment in
C/C++...

My goal is to write a complete basic-language byte-code compiler in C++ to
write compressed byte-code images in a specified format that later can be
loaded by a virtual machine in C++ to execute each byte-code/op-code in
memory.

You need to read on compiler construction. If taken seriously
this is a huge topic on its own. Tools like compiler compilers
(like bison, yacc, coco, etc..) can help tremendiously.

Compiling for a virtual machine is no more different then
for any other CPU. Just that you have the luxery of defining
the CPU (and the environment of this CPU works in) on your own.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top