diff options
| -rw-r--r-- | readme.md | 6 | ||||
| -rw-r--r-- | sanctuary.s | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -40,7 +40,7 @@ a variable that contains the first byte of user memory. ### `dp$ ( -- )` a variable that contains the last available byte of user memory. -### `executable ( u a -- )` +### `executable ( a u -- )` marks the u bytes starting at address a as executable. this is used primarily to mark the program break, which is used as the user memory space. @@ -61,7 +61,7 @@ yields the address of the first available byte in user memory. a variable containing the execution token of the most recently created word. -### `parse ( "<ws>name<ws>" c -- a u )` +### `parse ( "name<c>" c -- a u )` parse one word from the input buffer, separated by a newline or the character c, and return as a string. @@ -80,7 +80,7 @@ if -1 (true), the system is in compiling mode. ### `tib ( -- a )` a variable containing the address of the current input buffer. -### `type ( u a -- )` +### `type ( a u -- )` write u characters at a to output. ## dictionary format diff --git a/sanctuary.s b/sanctuary.s index 18c6623..30a9f5b 100644 --- a/sanctuary.s +++ b/sanctuary.s @@ -94,8 +94,8 @@ defcode "grow", grow, 0 defcode "executable", executable, 0 mov rdx, 0x7 ; PROT_{READ,WRITE,EXEC} - pspop rdi ; addr pspop rsi + pspop rdi ; addr mov rax, __NR_mprotect syscall ret @@ -223,8 +223,8 @@ defcode "parse", parse, 0 ; }}} defcode "type", type, 0 - pspop rdx pspop rsi + pspop rdx mov rdi, 1 mov rax, __NR_write syscall |
