Update readme

This commit is contained in:
Koichi Nakamura 2021-01-12 12:07:12 +09:00
parent d630d42ac3
commit a78b646597

View file

@ -1,7 +1,7 @@
# PlanckForth: Bootstrapping Forth from Handwritten ELF Binary
This project aims to bootstrap a Forth interpreter from hand-written tiny ELF binary, for fun.
No practical use.
This project aims to bootstrap a Forth interpreter from hand-written tiny ELF binary.
This is just for fun. No practical use.
## How to build
@ -51,7 +51,7 @@ $ ./planck < bootstrap.fs runtests.fs
# Builtin Words
| code | name | stack effect | semantics |
|:----:|:----------|:----------------|:-----------------------------|
|:----:|:----------|:----------------|:----------------------------------------|
| Q | quit | ( n -- ) | Exit the process |
| C | cell | ( -- n ) | The size of Cells |
| h | &here | ( -- a-addr ) | The address of 'here' cell |
@ -64,13 +64,13 @@ $ ./planck < bootstrap.fs runtests.fs
| x | execute | ( xt -- ... ) | Run the execution token |
| @ | fetch | ( a-addr -- w ) | Load value from addr |
| ! | store | ( w a-addr -- ) | Store value to addr |
| ? | cfetch | ( c-addr -- c ) | Load byte from addr |
| ? | cfetch | ( c-addr -- c ) | Load byte from addr with sign extension |
| $ | cstore | ( c c-addr -- ) | Store byte to addr |
| d | dfetch | ( -- a-addr ) | Get data stack pointer |
| D | dstore | ( a-addr -- ) | Set data stack pointer |
| r | rfetch | ( -- a-addr ) | Get return stack pointer |
| R | rstore | ( a-addr -- ) | Set return stack pointer |
| i | docol | ( -- a-addr ) | Get the interpreter function |
| i | docol | ( -- a-addr ) | Get the code pointer of interpreter |
| e | exit | ( -- ) | Exit current function |
| L | lit | ( -- n ) | Load immediate |
| S | litstring | ( -- c-addr ) | Load string literal |