aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2023-11-01Makefile now has recipes for example assembly programsAryadev Chavali
Dependencies are just ASM_OUT binary and the corresponding assembly program for the bytecode output file. Actually works very well, with changes triggering a recompilation. Also an `exec` recipe is introduced to do the task of compiling an assembly program and executing the corresponding bytecode all at once.
2023-11-01Makefile now has green colours for binaries and yellow for object filesAryadev Chavali
2023-10-31Moved inst module to libAryadev Chavali
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-29Make Verbose a universal flagAryadev Chavali
All objects target LIB anyway, so VERBOSE is a universal macro for this code base.
2023-10-26Implemented a rudimentary parser with support for 4 instruction typesAryadev Chavali
2023-10-26Makefile now prints dependencies on successful compilationAryadev Chavali
2023-10-26Moved base functions from inst.c to dedicated fileAryadev Chavali
Doesn't make sense for them to be in the VM module when they have a more general purpose now.
2023-10-25Separated lexer from main file in asmAryadev Chavali
2023-10-23Starting development on assembly languageAryadev Chavali
2023-10-23Make root directory an include path, set #include's properlyAryadev Chavali
Easier to write includes now just using < with the module name, in comparison to using relative paths.
2023-10-23Reintroduced example fib.c via examples/ folderAryadev Chavali
2023-10-23Added lib folder for general stuff, introduced as target to MakefileAryadev Chavali
2023-10-23src->vm, Makefile is now a bit more abstracted and pretty coloursAryadev Chavali
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-23Added an example program fib.cAryadev Chavali
This is simply a program with an embedded set of instructions which indefinitely computes and prints fibonacci numbers, computing them in pairs. Does it completely through the virtual machine rather than just hard C instructions. Also amended the Makefile to compile it. Required moving the main.c object file into the dependencies of $(DIST)/$(OUT). I should track the dependencies for fib.c and main.c as well.
2023-10-22Added flag to Makefile to set VERBOSE macro in base.hAryadev Chavali
2023-10-22Made a debug and release configuration via flagsAryadev Chavali
Also split out the check for whether $(DIST) exists by making it its own recipe. Removes the repeated checks in each object compilation.
2023-10-16Added functionality to read and write instruction bytecodeAryadev Chavali
Uses some bit hacks to quickly check what data type an opcode may have by shifting down to units then casting it to a data_type_t. Not very well tested yet, we'll need to see now.
2023-10-15Implemented a dynamically sized byte arrayAryadev Chavali
Pretty simple, want to ensure amortised constant big O so I use a REALLOC_MULT, which can be redefined if wished.
2023-10-15Moved vm_* code to its own file (runtime.(h|c))Aryadev Chavali
2023-10-15First commit!Aryadev Chavali
This is a from the ground rework of an old project of the same name. I'm hoping to be more concerned with runtime efficiency, bytecode size and all those things that should actually matter for something that may host time/space critical code.