Age | Commit message (Collapse) | Author | |
---|---|---|---|
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 | |
2023-11-02 | Implemented a routine which prints out a buffer of characters and use it | Aryadev Chavali | |
All in my assembly/virtual machine! | |||
2023-11-02 | Better logs for assembler | Aryadev Chavali | |
2023-11-02 | Implemented CALL(_STACK) and RET on the assembler | Aryadev Chavali | |
2023-11-02 | Made lexer more error prone so parser is less | Aryadev Chavali | |
Lexer now will straight away attempt to eat up any type or later portions of an opcode rather than leaving everything but the root. This means checking for type in the parser is a direct check against the name rather than prefixed with a dot. Checks are a bit more strong to cause more tokens to go straight to symbol rather than getting checked after one routine in at on the parser side. | |||
2023-11-02 | Fixed bug where deleting a page meant not being able to allocate another | Aryadev Chavali | |
This was due to the beg or end page being not set correctly (dangling pointer). | |||
2023-11-02 | Added memory leak dialog in vm_stop | Aryadev Chavali | |
Stack, call stack and heap are evaluated to check for leaks. | |||
2023-11-02 | Implemented subroutine instructions in runtime | Aryadev Chavali | |
Very easy overall, printing the call stack not so much. | |||
2023-11-02 | Introduced instructions to engage with a call stack | Aryadev Chavali | |
Essentially you may "call" an absolute program address, which pushes the current address onto the call stack. CALL_STACK does the same thing but the absolute program address is taken from the data stack. RET pops an address off the call stack then jumps to that address. | |||
2023-11-02 | Made separate tokens for JUMP_ABS and JUMP_STACK | Aryadev Chavali | |
Makes more sense, don't need to fiddle around with strings as much in the parser due to this! | |||
2023-11-02 | Updated instruction-test example for removal of jump.register | Aryadev Chavali | |
2023-11-02 | Removed instruction OP_JUMP_REGISTER | Aryadev Chavali | |
Not necessary when you can just push the relevant word onto the stack then just do OP_JUMP_STACK. | |||
2023-11-02 | Small fixes | Aryadev Chavali | |