fix stack notation

This commit is contained in:
Koichi Nakamura 2021-01-02 09:30:51 +09:00
parent 8c59b2fd67
commit 8741d78b4d

View file

@ -13,8 +13,8 @@ $ cat helloworld.fs | ./planck
|:----:|:---------|:----------------|:-----------------------------| |:----:|:---------|:----------------|:-----------------------------|
| Q | quit | ( -- ) | Exit the process | | Q | quit | ( -- ) | Exit the process |
| C | cell | ( -- n ) | The size of Cells | | C | cell | ( -- n ) | The size of Cells |
| h | &here | ( -- c-addr ) | The address of 'here' cell | | h | &here | ( -- a-addr ) | The address of 'here' cell |
| l | &latest | ( -- c-addr ) | The address of 'latest' cell | | l | &latest | ( -- a-addr ) | The address of 'latest' cell |
| k | key | ( -- c ) | Read character | | k | key | ( -- c ) | Read character |
| t | type | ( c -- ) | Print character | | t | type | ( c -- ) | Print character |
| j | jump | ( -- ) | Unconditional branch | | j | jump | ( -- ) | Unconditional branch |
@ -31,7 +31,7 @@ $ cat helloworld.fs | ./planck
| R | rstore | ( a-addr -- ) | Set 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 interpreter function |
| e | exit | ( -- ) | Exit current function | | e | exit | ( -- ) | Exit current function |
| L | lit | ( -- a ) | Load immediate | | L | lit | ( -- n ) | Load immediate |
| S | string | ( -- c-addr u ) | Load string literal | | S | string | ( -- c-addr u ) | Load string literal |
| + | add | ( a b -- c ) | c = (a + b) | | + | add | ( a b -- c ) | c = (a + b) |
| - | sub | ( a b -- c ) | c = (a - b) | | - | sub | ( a b -- c ) | c = (a - b) |