10 Commits

Author SHA1 Message Date
Aryadev Chavali
92f4f9011d Refactor vm/main to use refactor to program structure 2023-11-03 21:15:30 +00:00
Aryadev Chavali
4eee6e1a0a Implemented subroutine instructions in runtime
Very easy overall, printing the call stack not so much.
2023-11-02 23:25:33 +00:00
Aryadev Chavali
0f295221ca VM runtime now maintains a heap internally
Now need to create some instructions which manage the heap
2023-11-01 20:08:40 +00:00
Aryadev Chavali
c244e7c4a4 Use vm_stop and vm_load_registers
By default I initialise the registers with 8 words, though this may
not be necessary for your purposes.
2023-11-01 17:56:22 +00:00
Aryadev Chavali
6d35283ef0 Clearer VERBOSE messages 2023-11-01 15:22:47 +00:00
Aryadev Chavali
5d800d4366 Moved inst module to lib
As it has no dependencies on vm specifically, and it's more necessary
for any vendors who wish to target the virtual machine, it makes more
sense for inst to be a lib module rather than a vm module.
2023-10-31 21:14:14 +00:00
Aryadev Chavali
157c79d53c Added a "usage" message and colours for assembler
Prints useful and pretty messages when verbose being at least 1.
2023-10-29 16:59:31 +00:00
Aryadev Chavali
c8c5381cf2 vm/main takes a filename as input to execute bytecode
Also prints a usage for incorrect usage.
2023-10-26 10:18:53 +01:00
Aryadev Chavali
aa4a3b8614 Implemented simple example of a for loop in main 2023-10-23 03:59:34 +01:00
Aryadev Chavali
b44a61be41 src->vm, Makefile is now a bit more abstracted and pretty colours
Changed folder names for sake of clarity (will be introducing a new
build target soon), and Makefile can now easily support more targets.
2023-10-23 03:58:34 +01:00