2020-10-28 18:06:58 -04:00
|
|
|
: MOVE ( a1 a2 u -- )
|
|
|
|
?DUP IF ( u ) 0 DO ( a1 a2 )
|
2020-10-29 12:15:21 -04:00
|
|
|
OVER I + A@ ( src dst x )
|
|
|
|
OVER I + ( src dst x dst )
|
|
|
|
A! ( src dst )
|
2020-10-28 18:06:58 -04:00
|
|
|
LOOP THEN 2DROP ;
|
|
|
|
: MOVE- ( a1 a2 u -- )
|
2020-10-29 12:15:21 -04:00
|
|
|
?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 )
|
2020-10-28 18:06:58 -04:00
|
|
|
LOOP THEN 2DROP ;
|
|
|
|
: MOVE, ( a u -- ) H@ OVER ALLOT SWAP MOVE ;
|