chore: update readme
This commit is contained in:
45
README.md
45
README.md
@@ -1,11 +1,15 @@
|
|||||||
# 8086-rs
|
# 8086-rs
|
||||||
|
|
||||||
8086-rs is a Rust-based toolchain for analyzing and interpreting 16-bit 8086 binaries, made with the intention of interpreting binaries compiled for MINIX 1.x.
|
8086-rs is a Rust-based toolchain for analyzing and interpreting binaries, compiled for the Intel 16-bit 8086-type family, made with the intention of interpreting binaries compiled for MINIX 1.x.
|
||||||
|
|
||||||
It includes:
|
Features:
|
||||||
- a.out Parser to parse legacy MINIX 1.x executables.
|
- A parser for the `a.out` format, to parse legacy MINIX 1.x executables
|
||||||
- 8086 disassembler to parse the 16-bit instructions into an IR and prints them in a `objdump(1)`-style fashion.
|
- A disassembler to parse the 16-bit instructions into an IR
|
||||||
- 8086 interpreter which interprets the instructions with MINIX 1.x conventions (e.g. interrupts, memory layout, ...) in mind and obeys segment register indirection, which enables the usage of the **entire 20-bit memory bus**.
|
- Disassembly output in a `objdump(1)`-style fashion
|
||||||
|
- Interpretation of instructions
|
||||||
|
- MINIX 1.x interrupts and memory layout
|
||||||
|
- Obeying of segment register indirection (`CS`, `SS`, `DS`, `ES`)
|
||||||
|
- Full 20-bit memory bus
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -19,11 +23,13 @@ Or run it directly:
|
|||||||
cargo run -- --help
|
cargo run -- --help
|
||||||
```
|
```
|
||||||
|
|
||||||
Run with debug output:
|
Run with output:
|
||||||
```
|
```
|
||||||
RUST_LOG=debug cargo run -- interpret -p ./a.out 2>&1 | less
|
RUST_LOG=debug cargo run -- interpret -p ./a.out 2>&1 | less
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`info` will show things, such as register state and call to interrupts, `debug` will additionally show disassmbly and interpretation internals.
|
||||||
|
|
||||||
CLI Options:
|
CLI Options:
|
||||||
```
|
```
|
||||||
$ cargo run -- --help
|
$ cargo run -- --help
|
||||||
@@ -46,6 +52,25 @@ Options:
|
|||||||
-V, --version Print version
|
-V, --version Print version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
```
|
||||||
|
$ cat 1.c
|
||||||
|
main() {
|
||||||
|
write(1, "hello\n", 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ ./target/release/i8086-rs interpret -p ./a.out
|
||||||
|
hello
|
||||||
|
|
||||||
|
$ RUST_LOG=info ./target/release/i8086-rs interpret -p ./a.out
|
||||||
|
INFO: Initializing stack...
|
||||||
|
INFO: Initializing static data...
|
||||||
|
INFO: (0000) xor %bp, %bp 0000 0000 0000 0000 ffb4 0000 0000 0000 ---------
|
||||||
|
INFO: (0002) mov %bx, %sp 0000 0000 0000 0000 ffb4 0000 0000 0000 -----Z---
|
||||||
|
INFO: (0004) mov %ax, [%bx] 0000 ffb4 0000 0000 ffb4 0000 0000 0000 -----Z---
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
This project is under active development and primarily used by me to explore some Intel disassembly and learn some more Rust.
|
This project is under active development and primarily used by me to explore some Intel disassembly and learn some more Rust.
|
||||||
@@ -75,6 +100,14 @@ For the implementation of the disassembly, I used the Intel "8086 16-BIT HMOS MI
|
|||||||
|
|
||||||
For the implementation of the interpreter, I used the Intel "Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z" Spec.
|
For the implementation of the interpreter, I used the Intel "Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z" Spec.
|
||||||
|
|
||||||
|
## TODOs
|
||||||
|
|
||||||
|
- Map instructions into actual memory for interpretation
|
||||||
|
- Implement all Minix Interrupts
|
||||||
|
- Allow execution of 'raw' instructions, not only `a.out`
|
||||||
|
- Don't hardcode Minix
|
||||||
|
- Implement BIOS Interrupts
|
||||||
|
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user