J1 CPU emulator written in Rust.
Ported from j1 written in go.
requires rustup
$ cargo install --path .
Help with executable arguments <executable> -h
or <executable> --help
Name | Description |
---|---|
j1_tagged | j1 emulator |
j1_tagged_dump | dump j1 cpu memory in assembly or instruction AST format |
$ cargo test
$ cargo doc
# open j1-cpu/target/doc/j1/index.html with browser
# option -r or --repl
$ j1_tagged --repl
# from j1-tagged directory
$ j1_tagged --repl --script resources/fib.4th
# help -h or --help
# Note: results saved to <script_file>-log.txt if not running repl
$ j1_tagged -h
j1_tagged 1.0
Roy Crippen
J1_tagged cpu emulator
USAGE:
j1_tagged [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-r, --repl Run the J1 forth repl
-V, --version Prints version information
OPTIONS:
-b, --bin <bin_file> Binary J1 forth image to load, default is j1e_bytes::J1E_BYTES
-s, --script <script_file> Forth script file to load and execute
Task | Done |
---|---|
stack | ✔ |
instructions | ✔ |
cpu | ✔ |
dump memory to asm and ast | ✔ |
j1 emulator | ✔ |
arguments for j1 executable | ✔ |
j1 gRPC service | ✔ |
move R->PC to bit 4 | ✔ |
allow 5 bit opcodes | |
implement 32 bit tagged memory | |
add verbosity levels |