mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 04:58:05 +11:00
75ef1f440c
This allows us to remove AMOVE* words.
14 lines
400 B
Plaintext
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 ;
|