From 4d9ef994097166a21febb181682c73985089eddd Mon Sep 17 00:00:00 2001 From: kitty Date: Mon, 23 Mar 2026 01:55:15 +1100 Subject: create does> constant seems to work just fine. wonderful! i don't think the speed should be that much worse but if it ends up being slow i can manually make a faster `constant`. --- readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index c9e5323..d21df82 100644 --- a/readme.md +++ b/readme.md @@ -253,6 +253,14 @@ bytes are copied in high memory to low memory order. ### `compile, ( xt -- )` compile a call to xt into user memory. +### `constant ( u "name" -- )` +create a word that pushes a cell value u to the stack. + +### `create ( "name" -- )` +create a word in the dictionary that, by default, +pushes the address directly following the header to the stack. +this behaviour can be modified with `does>`. + ### `d, ( n -- )` write a 32 bit value to user memory and increment the user memory pointer. @@ -262,6 +270,10 @@ store the 32 bit value u into the memory address a. ### `decimal ( -- )` set current base to decimal. +### `does> ( -- )` +modify the behaviour of the most recent `create`d word. +(non-`create`d words will be corrupted.) + ### `dp ( -- a )` a variable that contains the lowest free byte of memory in user memory. -- cgit v1.2.3