mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Update readme
This commit is contained in:
parent
d630d42ac3
commit
a78b646597
1 changed files with 41 additions and 41 deletions
10
README.md
10
README.md
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue