Skip to content

roycrippen/j1-cpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J1 CPU emulator

J1 CPU emulator written in Rust.
Ported from j1 written in go.
requires rustup

build and install

$ cargo install --path . 

executables

Help with executable arguments <executable> -h or <executable> --help

Name Description
j1 j1 emulator
j1_dump dump j1 cpu memory in assembly or instruction AST format
j1_example_compile_and_dump example of programmatically using j1

test

$ cargo test

document

$ cargo doc
# open j1-cpu/target/doc/j1/index.html with browser

run j1 eforth repl

# option -r or --repl
$ j1 --repl

run j1 eforth repl with a script

# from j1-cpu directory
$ j1 --repl --script resources/simple.fth

j1 options

# help -h or --help
# Note: results saved to <script_file>-log.txt if not running repl
$ j1 -h

j1 1.0
Roy Crippen
J1 cpu emulator

USAGE:
    j1 [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 imamge to load
    -s, --script <script_file>    Forth script file to load and execute

todo

Task Done
stack
instructions
cpu
dump memory to asm and ast
j1 emulator
arguments for j1 executable
j1 gRPC service
add verbosity levels