collapseos/blk/367
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

14 lines
400 B
Plaintext

: MOVE ( a1 a2 u -- )
?DUP IF ( u ) 0 DO ( a1 a2 )
OVER I + A@ ( src dst x )
OVER I + ( src dst x dst )
A! ( src dst )
LOOP THEN 2DROP ;
: MOVE- ( a1 a2 u -- )
?DUP IF ( u ) 0 DO ( a1 a2 )
OVER I' + I - 1- A@ ( src dst x )
OVER I' + I - 1- ( src dst x dst )
A! ( src dst )
LOOP THEN 2DROP ;
: MOVE, ( a u -- ) H@ OVER ALLOT SWAP MOVE ;