2020-10-29 12:15:21 -04:00
|
|
|
: MOVEW ( src dst u -- )
|
|
|
|
( u ) 0 DO
|
|
|
|
SWAP DUP I 1 LSHIFT + A@ ( dst src x )
|
|
|
|
ROT TUCK I 1 LSHIFT + ( src dst x dst )
|
|
|
|
A! ( src dst )
|
|
|
|
LOOP 2DROP ;
|
|
|
|
: PREV 3 - DUP @ - ;
|
2020-10-28 18:06:58 -04:00
|
|
|
: [entry] ( w -- )
|
|
|
|
C@+ ( w+1 len ) TUCK MOVE, ( len )
|
|
|
|
( write prev value )
|
|
|
|
H@ CURRENT @ - ,
|
|
|
|
C, ( write size )
|
2020-10-29 12:15:21 -04:00
|
|
|
H@ CURRENT ! ;
|
2020-10-28 18:06:58 -04:00
|
|
|
: (entry) WORD [entry] ;
|
|
|
|
: CREATE (entry) 2 ( cellWord ) C, ;
|
|
|
|
: VARIABLE CREATE 2 ALLOT ;
|