The download has three files in it. First, Code.txt. Write your test code (I've written some as an example) in here. Second, Assembler.exe. This translates Code.txt into ByteCode and outputs into a new file (Script). Finally, run VM.exe to run the script.
The Code has the following syntax (it's based on ASM):
Code: Select all
'This is a comment
Title "Not nessacary, and uneeded in this early version"
StackSize 1024 'Again, not nessacary
Entry Start 'Not nessacary, but usefull
.data 'This section is where you declare variables
One.l
Two.f
Three.s
.code 'This is where you write your code
Start: 'This is a label
Add One,1
.end 'Nothing after this line
Interger maths: ADD, SUB, MUL, DIV
Float maths: FADD, FSUB, FMUL, FDIV
General: JMP, Mov
There are also 15 registers to play with (although 3 have a specific usage):
Long registers: L0, L1, L2, L3, L4
Float registers: F0, F1, F2, F3, F4
String registers: S0, S1, S2, S3, S4
The '0' registers will hold the result of a command excecuted via a call:
Code: Select all
Push 97
Call [Chr] 'Supported calls are MessageBox, Len, Chr and Asc
'S0 now holds "a"
Enjoy!
DOWNLOAD