Age | Commit message (Collapse) | Author | |
---|---|---|---|
2023-11-29 | Added function to copy tokens | Aryadev Chavali | |
This essentially just copies the internal string of the token into a new buffer. | |||
2023-11-29 | Added TOKEN_PP_USE to lexer with implementation | Aryadev Chavali | |
2023-11-29 | Moved preprocessor>Constants to Completed and started work on %USE | Aryadev Chavali | |
2023-11-29 | Added todo for preprocessor "%MACRO" | Aryadev Chavali | |
This is different to "%CONST" in that it can take token parameters and use them. This allows the construction of user code at compile time, which can be very useful for a variety of use cases. | |||
2023-11-29 | Added todo for preprocessor "%USE" blocks | Aryadev Chavali | |
Essentially importing another file *literally* into the file. This would happen before parse results are gathered, similar to how "%CONST" is implemented currently. | |||
2023-11-29 | Cleaned up todos standard library a bit more | Aryadev Chavali | |
2023-11-11 | Added string literals in tokeniser | Aryadev Chavali | |
Doesn't do much, invalid for most operations. | |||
2023-11-09 | Use constants in examples where possible | Aryadev Chavali | |
Stuff like numeric limits can be codified in constants which act self documenting. | |||
2023-11-09 | Mark off constants as done in TODO.org | Aryadev Chavali | |
2023-11-08 | Makefile now assembles and interprets instruction-test.asm example first | Aryadev Chavali | |
2023-11-08 | Added a preprocessing routine in assembler | Aryadev Chavali | |
Preprocessor handles macros and macro blocks by working at the token level, not doing any high level parsing or instruction making. Essentially every macro is recorded in a registry, recording the name and the tokens assigned to it. Then for every caller it just inserts the tokens inline, creating a new stream and freeing the old one. It leaves actual high level parsing to `parse_next` and `process_presults`. | |||
2023-11-08 | Added log in assembler for reading a certain number of bytes | Aryadev Chavali | |
2023-11-08 | Lexer symbols now recognise macro constants and references | Aryadev Chavali | |
2023-11-08 | Fixed issue where, on error, runtime would show wrong instruction | Aryadev Chavali | |
When an error occurred, because prog->ptr was incremented beforehand the trace would show the next instruction as the culprit rather than the actual instruction. This commit fixes that by incrementing the program if and only if the command was run successfully. | |||
2023-11-06 | Current work on preprocessor | Aryadev Chavali | |
2023-11-05 | Current work on preprocessor implementation | Aryadev Chavali | |
Lots to refactor and test | |||
2023-11-05 | Redefined proposed syntax for preprocessor in TODO.org | Aryadev Chavali | |
2023-11-04 | Added TODO for inlining labels | Aryadev Chavali | |
2023-11-04 | Added tags for TODO.org | Aryadev Chavali | |
2023-11-04 | Did some more work on the spec | Aryadev Chavali | |
2023-11-04 | Fixed up example comments and some assembly | Aryadev Chavali | |
2023-11-03 | Added steps to creating an in memory instance of the VM | Aryadev Chavali | |
This would be useful when writing an interpreted language where the "assembly" and the "execution" occur within the same executable. | |||
2023-11-03 | Updated LOC | Aryadev Chavali | |
2023-11-03 | Cleaned up How to build section of README | Aryadev Chavali | |
2023-11-03 | Added Makefile recipe to interpret all examples | Aryadev Chavali | |
2023-11-03 | Symbols may now include digits in lexer | Aryadev Chavali | |
This is mostly so labels get to have digits. This won't affect number tokens as that happens before symbols. | |||
2023-11-03 | Removed tabs from VERBOSE logs in asm/main.c | Aryadev Chavali | |
2023-11-03 | Used more subroutines in fib.asm to make code clearer | Aryadev Chavali | |
Looks way more high level but parses down to a very simple bytecode. However, because of lack of inline code processing, it relies on the call stack quite heavily. With inline labels this would be a much more compact bytecode. | |||
2023-11-03 | Use label features and entry points for examples | Aryadev Chavali | |
2023-11-03 | Added note in TODO.org | Aryadev Chavali | |
Implementing start points has made features necessary for a standard library setup easier to see. | |||
2023-11-03 | Completed start points TODO | Aryadev Chavali | |
2023-11-03 | Fixed bug where labels were off by one | Aryadev Chavali | |
Was used in a previous fix but not necessary anymore | |||
2023-11-03 | Fixed bug where runtime would not start program at the right place | Aryadev Chavali | |
In vm_execute_all set the program pointer to the start address in the header of the program payload. | |||
2023-11-03 | Added memory-print.asm to examples list in Makefile | Aryadev Chavali | |
2023-11-03 | Refactor assembler to use prog_t structure | Aryadev Chavali | |
Set the program structure correctly with a header using the parsed global instruction. | |||
2023-11-03 | Refactor vm/main to use refactor to program structure | Aryadev Chavali | |
2023-11-03 | Use program structure for runtime | Aryadev Chavali | |
Very barebones, essentially a simple refactor. I need to introduce a feature to append to a program as well, but as it's a flexible structure it will likely have to be functional. | |||
2023-11-03 | Defined a `program` structure | Aryadev Chavali | |
Essentially a "program header", followed by a count, followed by instructions. Provides a stronger format for bytecode files and allows for better bounds checking on instructions. | |||
2023-11-03 | Added a start address (equivalent to `main`) to assembler | Aryadev Chavali | |
Creates a jump address to the label delegated by "global" so program starts at that point. | |||
2023-11-03 | Added todo for making a standard library | Aryadev Chavali | |
Some considerations as to how to do this (dynamic or static linking) and changes needed in VM/assembler for this to work. | |||
2023-11-03 | Added todo to make a "main routine" specification in assembler | Aryadev Chavali | |
2023-11-03 | Mark off completed tasks in todo.org | Aryadev Chavali | |
2023-11-03 | Started work on spec for data storage types in VM | Aryadev Chavali | |
2023-11-03 | Added TODO and WIP tags for spec | Aryadev Chavali | |
2023-11-03 | Made test.asm an example asm program | Aryadev Chavali | |
2023-11-02 | Added comments to test.asm | Aryadev Chavali | |
2023-11-02 | Update spec footnotes | Aryadev Chavali | |
2023-11-02 | Updated LOC in README | Aryadev Chavali | |
2023-11-02 | Started working on a spec, still needs a lot of work | Aryadev Chavali | |
2023-11-02 | Added recipes to assemble or interpret individually | Aryadev Chavali | |