1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 11:18:05 +11:00
collapseos/blk/368
Virgil Dupras 75ef1f440c Make MOVE* words use A@ and A!
This allows us to remove AMOVE* words.
2020-10-29 12:15:21 -04:00

17 lines
462 B
Plaintext

: 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 @ - ;
: [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 ;