added readme, made program installable
This commit is contained in:
parent
522043e376
commit
b95c01116a
@ -9,3 +9,6 @@ edition = "2021"
|
|||||||
clap = { version = "4.4.8", features = ["derive"] }
|
clap = { version = "4.4.8", features = ["derive"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
simple_logger = "4.2.0"
|
simple_logger = "4.2.0"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "dekejit"
|
||||||
|
31
README.md
Normal file
31
README.md
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# DEKEJIT
|
||||||
|
|
||||||
|
## EXPERIMENTAL!! NOTHING WORKS AND MAKES SENSE!!!
|
||||||
|
|
||||||
|
This is an experimental 16-bit virtual machine.
|
||||||
|
|
||||||
|
A lenghty description can be found [here.](spec.md)
|
||||||
|
|
||||||
|
If you want to have a great time, you can try experimenting with it:
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
Clone this repository, and run "cargo build".
|
||||||
|
|
||||||
|
This currently builds the virtual machine, which can execute binary files, and an assembler which can turn text files into binary files.
|
||||||
|
|
||||||
|
To install the program, run `cargo install --path .` .
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
`dekejit build <assemby_file> <output_file>` will read the provided `<assembly_file>` and write a binary file `<output_file>` which can be executed using `dekejit run <binary_file>`
|
||||||
|
|
||||||
|
A few example files can be found in `tests/assembly/`.
|
||||||
|
|
||||||
|
|
||||||
|
### Future
|
||||||
|
|
||||||
|
Right now the only possible way to use the virtual machine is to manually write the assembly.
|
||||||
|
In the future, small compilers for toy languages will be built that target my toy assembly.
|
||||||
|
|
||||||
|
|
4
spec.md
4
spec.md
@ -91,9 +91,7 @@ The constant is added to the value of the second register argument.
|
|||||||
|
|
||||||
### JIT's system calls:
|
### JIT's system calls:
|
||||||
|
|
||||||
the `CALL` instruction is a bit of a hack because I want to load more functionality into the thing.
|
What the `CALL` instruction does is up to implementations. The JIT can decide what to do with the register s0 and the number c. It could provide mechanisms to perform I/O on a true filesystem, on an emulated filesystem, or it could do something else entirely, i.e, something web related.
|
||||||
The JIT can decide what to do with the register s0 and the number c.
|
|
||||||
It should be possible to open files, write files, read stdin, write to stdout, etc...
|
|
||||||
|
|
||||||
#### io\_vec: first systemcall environment
|
#### io\_vec: first systemcall environment
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user