core: add AMOVEW

This commit is contained in:
Virgil Dupras 2020-08-31 12:11:17 -04:00
parent 3a84a3871b
commit 4910b9caef
3 changed files with 14 additions and 0 deletions

6
blk/395 Normal file
View File

@ -0,0 +1,6 @@
: AMOVEW ( 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 ;

Binary file not shown.

View File

@ -185,6 +185,14 @@ A! c a -- Indirect C!
A@* -- a Address for A@ word
A!* -- a Address for A! word
AMOVE src dst u -- Same as MOVE, but with A@ and A!
AMOVEW src dst u -- Same as AMOVE, but with words
AMOVEW notes: this word's purpose is to interface with word-
based systems. src and dst are addressed as *bytes* but u is a
*word* count. Every iteration increases src and dst by 2. When
you use it, be aware that default values for A!* and A@* are C!
and C@. If you don't adjust before using AMOVEW, you will get
weird results.
# Arithmetic / Bits