Age | Commit message (Collapse) | Author | |
---|---|---|---|
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 | |
2023-11-02 | Created a preprocessing unit presult_t and a function to process them | Aryadev Chavali | |
Essentially a presult_t contains one of these: 1) A label construction, which stores the label symbol into `label` (PRES_LABEL) 2) An instruction that calls upon a label, storing the instruction in `instruction` and the label name in `label` (PRES_LABEL_ADDRESS) 3) An instruction that uses a relative address offset, storing the instruction in `instruction` and the offset wanted into `relative_address` (PRES_RELATIVE_ADDRESS) 4) An instruction that requires no further processing, storing the instruction into `instruction` (PRES_COMPLETE_INSTRUCTION) In the processing stage, we resolve all calls by iterating one by one and maintaining an absolute instruction address. Pretty nice, lots more machinery involved in parsing now. | |||
2023-11-02 | Started work on preprocessing jump addresses | Aryadev Chavali | |
2023-11-02 | Added a TODO file for tasks | Aryadev Chavali | |
2023-11-01 | A small program I am currently working on: reverses an allocated buffer of ↵ | Aryadev Chavali | |
bytes, returning a new set | |||
2023-11-01 | Added MALLOC_STACK and SUB to instruction-test example | Aryadev Chavali | |
2023-11-01 | Implemented MALLOC_STACK and SUB in the assembler | Aryadev Chavali | |
2023-11-01 | Implemented OP_MALLOC_STACK and OP_SUB in the runtime | Aryadev Chavali | |
2023-11-01 | Added instructions for MALLOC_STACK and SUB | Aryadev Chavali | |
MALLOC_STACK is a stack based version of MALLOC, SUB does subtraction. | |||
2023-11-01 | Fixed issue where sometimes vm_print_registers wouldn't work for bytes | Aryadev Chavali | |
Happened because we weren't printing all relevant words due to naturally flooring the result of division. Here I ceil the division to ensure we get the maximal number of words necessary. | |||
2023-11-01 | Updated instruction-test example file for new memory management instructions | Aryadev Chavali | |
2023-11-01 | Implemented stack versions of MGET and MSET in assembler | Aryadev Chavali | |
2023-11-01 | Added todos to rename the constructive macros in runtime.c | Aryadev Chavali | |
2023-11-01 | Implemented MGET_STACK and MSET_STACK in the runtime | Aryadev Chavali | |
Very easy, they just pop a word then defer to their normal versions. This is probably the best case where a macro works directly so I didn't even need to write a function form for them first. One thing is that then names for the macros are quite bad right now, probably need renaming. | |||
2023-11-01 | Added stack based versions of MSET and MGET | Aryadev Chavali | |
Essentially they use the stack for their one and only operand. This allows user level control, in particular it allows for loops to work correctly while using these operands. | |||
2023-11-01 | Implemented OP_MSIZE into lexer/parser of ASM | Aryadev Chavali | |
2023-11-01 | Implemented OP_MSIZE in the VM runtime | Aryadev Chavali | |