A virtual machine that comes with a basic compiler
There is documentation in the readme.md file.
The compiler can compile files of any length
type in the terminal the following:
for a quick test
To assemble a program:
./main asm <input_file> <output_file>
The provided source code file is 'src_code'
and the provided output file is 'bytecode_text'
To execute a program:
./main exec <bytecode> <coming soon: data>
The virtual machine is 32-bit and uses registers.
It reads machine code from a file into a program array and decodes the instruction (splits the instruction into three parts) so that the machine can execute them.
I am working on labels, which can be used to create functions.
I am also adding a data segment which will be used for storing variables.
If you are interested, you can read this:
It has a lot of good information if you want to make a VM and helped my out a lot with the decode function.
Hey @tree5673! We're embarking on a small project, okay, it's not too small, but me and a small group of programmers are creating a language, we have a VM, a Git, a specification, some other stuff.
We've started this week and have already made major progress, would you be interested in joining us?
If this is really your code, then your skill set would be of great use to us.
If you're interested in at least checking it out, please ping me.
(This is a modified version of the repl I posted previously)
What Repl? This is your first apparently. And first post.