mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-14 14:48:08 +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...
17 lines
241 B
Plaintext
17 lines
241 B
Plaintext
: [entry] ( w -- )
|
|
C@+ ( w+1 len ) TUCK MOVE, ( len )
|
|
( write prev value )
|
|
H@ CURRENT @ - ,
|
|
C, ( write size )
|
|
H@ CURRENT !
|
|
;
|
|
: (entry) WORD [entry] ;
|
|
: CREATE (entry) 2 ( cellWord ) C, ;
|
|
: VARIABLE CREATE 2 ALLOT ;
|
|
|
|
|
|
|
|
|
|
|
|
|