mirror of
https://github.com/hsoft/collapseos.git
synced 2025-02-19 07:06:01 +11:00
core: add word "MOVE"
This commit is contained in:
parent
6f9d0a98c4
commit
058b85686f
@ -98,6 +98,8 @@ C! c a -- Store byte c in address a
|
|||||||
CURRENT -- a Set a to wordref of last added entry.
|
CURRENT -- a Set a to wordref of last added entry.
|
||||||
HERE -- a Push HERE's address
|
HERE -- a Push HERE's address
|
||||||
H@ -- a HERE @
|
H@ -- a HERE @
|
||||||
|
MOVE a1 a2 u -- Copy u bytes from a1 to a2, starting with a1, going
|
||||||
|
up.
|
||||||
|
|
||||||
*** Arithmetic / Bits ***
|
*** Arithmetic / Bits ***
|
||||||
|
|
||||||
|
@ -118,3 +118,12 @@
|
|||||||
( Set up initial SYSVNXT value, which is 2 bytes after its
|
( Set up initial SYSVNXT value, which is 2 bytes after its
|
||||||
own address )
|
own address )
|
||||||
46 RAM+ DUP 2 + SWAP !
|
46 RAM+ DUP 2 + SWAP !
|
||||||
|
|
||||||
|
( a1 a2 u -- )
|
||||||
|
: MOVE
|
||||||
|
( u ) 0 DO
|
||||||
|
SWAP DUP I + @ ( a2 a1 x )
|
||||||
|
ROT SWAP OVER I + ( a1 a2 x a2 )
|
||||||
|
! ( a1 a2 )
|
||||||
|
LOOP
|
||||||
|
;
|
||||||
|
Loading…
Reference in New Issue
Block a user