mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 22:48:06 +11:00
3d2dc041fb
Instead of having wordref point to core word routines, I made them into word 4 word types. It liberates space into the stable ABI and should make porting to other arches easier. I'm also thinking of combining word type with the namelen field for precious bytes saving, but not now...
16 lines
438 B
Plaintext
16 lines
438 B
Plaintext
: DOES>
|
|
( Overwrite cellWord in CURRENT )
|
|
3 ( does ) CURRENT @ C!
|
|
( When we have a DOES>, we forcefully place HERE to 4
|
|
bytes after CURRENT. This allows a DOES word to use ","
|
|
and "C," without messing everything up. )
|
|
CURRENT @ 3 + HERE !
|
|
( HERE points to where we should write R> )
|
|
R> ,
|
|
( We're done. Because we've popped RS, we'll exit parent
|
|
definition )
|
|
;
|
|
: CONSTANT CREATE , DOES> @ ;
|
|
|
|
|