35 Commits

Author SHA1 Message Date
Aryadev Chavali
30bed795fd New TODO on reworking the entire virtual machine
Some checks failed
C/C++ CI / build (push) Has been cancelled
C/C++ CI / test (push) Has been cancelled
I've had a revelation: the virtual machine shouldn't cater to any
specific dynamic or trend.  What I need the VM to do is provide a
basis where very useful features such as arithmetic of arbitrary sized
integers, basic control flow, memory management and file I/O are a bit
nicer than doing it myself in C.  Past that it can be as barebones as
necessary.

Previous development was done in tandem with the assembler, which
influenced how I designed the system.  I will no longer do this.  Here
I describe the creation of more generic opcodes and instructions.
These complicate the virtual machined data model but they are also
extensible, can be generalised to a wider array of use cases and can
be optimised by the virtual machine.

Instead, the assembler can use these generic instructions and make
porcelains over them to provide a nicer environment.  Take the new
PUSH opcode: since it can take an arbitrary payload of bytes and push
them all onto the stack, the assembler can provide porcelains for
shorts, half words and words as well as more interesting macros.
2024-07-10 19:37:02 +01:00
Aryadev Chavali
8b2192a0b6 Add a todo to rework the heap 2024-06-28 00:27:53 +01:00
Aryadev Chavali
a24196f236 Fix up some TODOs 2024-06-24 17:03:19 +01:00
Aryadev Chavali
3cd2dbc2ac Registers are now fixed size
todo.org contains an explanation for this
2024-06-24 15:14:11 +01:00
Aryadev Chavali
bdc6e15ae9 Updated includes, README and TODO 2024-06-19 20:01:20 +01:00
Aryadev Chavali
a83653f45d Added vm/struct.h and vm/main.c to documenting TODO 2024-04-29 01:38:51 +05:30
Aryadev Chavali
f64f456dff Finished documenting lib/heap.h 2024-04-29 01:38:43 +05:30
Aryadev Chavali
38d7c13287 Migrate virtual machine from OVM project and rewrite README 2024-04-16 18:21:05 +06:30
Aryadev Chavali
d5c43b1c3f Wrote up some notes on how preprocesser language may work
Bit formal and really excessively written but I needed my thoughts
down.
2024-04-16 15:42:34 +06:30
Aryadev Chavali
d594c0c531 Annotate some completed todos in todo.org 2024-04-15 16:35:44 +06:30
Aryadev Chavali
b7a40f4ab0 Documented lib/darr.h 2024-04-14 02:36:30 +06:30
Aryadev Chavali
99a81ce95d Added todo to rewrite assembler in a different language 2024-04-14 02:34:40 +06:30
Aryadev Chavali
38a24f172f Finished todo on importing another file 2024-04-14 02:34:28 +06:30
Aryadev Chavali
a8a2c50a8f Reworking todos on library linking 2024-04-09 21:24:46 +06:30
Aryadev Chavali
d256e06f51 Mid-work through documenting darr.h 2024-04-09 21:21:12 +06:30
Aryadev Chavali
84028dab79 Done TODO: Comment coverage > lib > base.h
Pretty simple
2024-04-09 15:15:00 +06:30
Aryadev Chavali
afb48b65b9 Completed TODO: Rigid Endian
Just used the endian.h functions to convert host endian to and from
big endian.
2024-04-09 15:11:42 +06:30
Aryadev Chavali
6df6dce153 Added todo to force an endian convention
I've flip flopped a bit on this but I believe the virtual machine
bytecode format must have a convention on endianness.  This is because
of the issue stated in the TODO which may very well happen.
2024-04-09 15:10:26 +06:30
Aryadev Chavali
9250a2a838 Added better documentation to TODO list 2024-04-08 04:44:10 +06:30
Aryadev Chavali
cad92bf3ba Moved preprocessor>Constants to Completed and started work on %USE 2023-11-29 15:37:57 +00:00
Aryadev Chavali
691069fa45 Added todo for preprocessor "%MACRO"
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 15:36:52 +00:00
Aryadev Chavali
f1fde81b82 Added todo for preprocessor "%USE" blocks
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 15:36:02 +00:00
Aryadev Chavali
456b9f38f2 Cleaned up todos standard library a bit more 2023-11-29 15:35:44 +00:00
Aryadev Chavali
f896ad2cb7 Mark off constants as done in TODO.org 2023-11-09 08:52:07 +00:00
Aryadev Chavali
6e524569c3 Current work on preprocessor 2023-11-06 08:16:15 +00:00
Aryadev Chavali
aadb21853a Redefined proposed syntax for preprocessor in TODO.org 2023-11-05 16:20:14 +00:00
Aryadev Chavali
a3d8e5ee1f Added TODO for inlining labels 2023-11-04 06:40:56 +00:00
Aryadev Chavali
262a271f42 Added tags for TODO.org 2023-11-04 06:40:42 +00:00
Aryadev Chavali
dea8e23807 Added note in TODO.org
Implementing start points has made features necessary for a standard
library setup easier to see.
2023-11-03 21:23:26 +00:00
Aryadev Chavali
232252c252 Completed start points TODO 2023-11-03 21:23:19 +00:00
Aryadev Chavali
32d50a9342 Added todo for making a standard library
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 08:19:21 +00:00
Aryadev Chavali
d024ecf2e0 Added todo to make a "main routine" specification in assembler 2023-11-03 08:19:17 +00:00
Aryadev Chavali
6194cb6d2c Mark off completed tasks in todo.org 2023-11-03 08:15:21 +00:00
Aryadev Chavali
d5e311c9d4 Started work on preprocessing jump addresses 2023-11-02 20:31:22 +00:00
Aryadev Chavali
d12820cd25 Added a TODO file for tasks 2023-11-02 14:40:56 +00:00