diff --git a/README.md b/README.md index 846c366..a34c668 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,8 @@ fj hello_world.fj ![Hello World in FlipJump](resources/hello.gif) - The --no-stl flag tells the assembler not to include the standard library. for example: `fj programs/print_tests/hello_no-stl.fj --no-stl`. - - the -w [WIDTH] flag allows compiling the .fj files to a WIDTH-bits memory width. WIDTH is 64 by default. - - You can use the -o flag to save the assembled file for later use too. + - the `-w [WIDTH]` flag allows compiling the .fj files to a WIDTH-bits memory width. WIDTH is 64 by default. + - You can use the `-o` flag to save the assembled file for later use too. - you can find all the different flags with `fj -h`. You can also **[Test the project](tests/README.md#run-the-tests)** with the project's tests, and with your own tests. diff --git a/flipjump/README.md b/flipjump/README.md index 8473c1d..3e0dd88 100644 --- a/flipjump/README.md +++ b/flipjump/README.md @@ -11,7 +11,7 @@ The assembler has 4 steps: - writing the binary data into the executable ([fjm_writer.py](fjm/fjm_writer.py)). The whole process is executed within the [assemble()](assembler/assembler.py) function. -![Assembly of calc.fj](../resources/calc__asm.jpg) +![Assembly of calc.fj](../resources/calc__asm.png) - The [ops.py](assembler/inner_classes/ops.py) file contains the classes of the different assembly ops. - The [expr.py](assembler/inner_classes/expr.py) file contains the expression class (Expr), which is the code's representation of the assembly mathematical expressions. The expressions are based on numbers and labels. @@ -22,7 +22,7 @@ The Interpreter ([fjm_run.py](interpretter/fjm_run.py)) stores the entire memory The whole interpretation is done within the [run()](interpretter/fjm_run.py) function (also uses the [fjm_reader.py](fjm/fjm_reader.py) to read the fjm file - i.e. to get the flipjump program memory from the compiled fjm file). More about [how to run](../README.md#how-to-run). -![Running the compiled calculator](../resources/calc__run.jpg) +![Running the compiled calculator](../resources/calc__run.png) ### The Debugger @@ -72,8 +72,15 @@ for example: f1:32:rep6:hex.print---f2:17:print_bit---print_label the short_file_name is (by default) s1,s2,s3,... for the standard library files (in the order of [stl/conf.json - all](stl/conf.json)), and f1,f2,f3,... for the compiled .fj files, in the order they are mentioned to the compiler (or appear in the test-line). -You can place breakpoints to stop on specific labels using the `-d`, followed by a `-b` and a label name (or `-B` and a part of a label name). For example: -![Debugging Demo](../resources/breakpoint.jpg) +You can place breakpoints to stop on specific labels using the `-d`, followed by a `-b` and a label name. You cal also use `-B` instead of `-d` in order to stop on all labels that contain a substring. + +For example stopping on the label "start": +![Debugging Demo](../resources/breakpoint.png) +Read memory (You can read the memory as if it was flipjump variables): +![Debugging Demo](../resources/debug_read_memory.png) +Notice that `:b8:ascii` is 0x36, which is the ascii of `'6'`, which was the input to the program: +![Debugging Demo](../resources/debug_read_memory_result.png) + ## More Files diff --git a/resources/breakpoint.jpg b/resources/breakpoint.jpg deleted file mode 100644 index 1344b69..0000000 Binary files a/resources/breakpoint.jpg and /dev/null differ diff --git a/resources/breakpoint.png b/resources/breakpoint.png new file mode 100644 index 0000000..54366f9 Binary files /dev/null and b/resources/breakpoint.png differ diff --git a/resources/calc__asm.jpg b/resources/calc__asm.jpg deleted file mode 100644 index 29e7481..0000000 Binary files a/resources/calc__asm.jpg and /dev/null differ diff --git a/resources/calc__asm.png b/resources/calc__asm.png new file mode 100644 index 0000000..d071948 Binary files /dev/null and b/resources/calc__asm.png differ diff --git a/resources/calc__run.jpg b/resources/calc__run.jpg deleted file mode 100644 index a6635ca..0000000 Binary files a/resources/calc__run.jpg and /dev/null differ diff --git a/resources/calc__run.png b/resources/calc__run.png new file mode 100644 index 0000000..9ef1d12 Binary files /dev/null and b/resources/calc__run.png differ diff --git a/resources/debug_read_memory.png b/resources/debug_read_memory.png new file mode 100644 index 0000000..bedb75c Binary files /dev/null and b/resources/debug_read_memory.png differ diff --git a/resources/debug_read_memory_result.png b/resources/debug_read_memory_result.png new file mode 100644 index 0000000..c23a72f Binary files /dev/null and b/resources/debug_read_memory_result.png differ diff --git a/resources/hello.gif b/resources/hello.gif index 5efe658..a2b3535 100644 Binary files a/resources/hello.gif and b/resources/hello.gif differ diff --git a/resources/sum.gif b/resources/sum.gif deleted file mode 100644 index 0297892..0000000 Binary files a/resources/sum.gif and /dev/null differ diff --git a/tests/README.md b/tests/README.md index 43375c7..c7f8020 100644 --- a/tests/README.md +++ b/tests/README.md @@ -97,9 +97,9 @@ To add a new test, create your .fj programs, and you predefined input and expect Then choose the relevant csv file. The rule of thumb (for the sum of compile+run times, in seconds): -| fast | medium | slow | -|--------------|--------------|------| -| 0 → 0.5 | 0.5 → 5 | else | +| fast | medium | slow | hexlib | +|--------------|----------------|------|----------------| +| 0 → 0.2 | 0.2 → 0.7 | 0.7+ | tests `ns hex` | Then add a new line to the relevant compile-csv and run-csv files, according to the next formats.