core: add AMOVEW
This commit is contained in:
parent
3a84a3871b
commit
4910b9caef
6
blk/395
Normal file
6
blk/395
Normal 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 ;
|
BIN
cvm/forth.bin
BIN
cvm/forth.bin
Binary file not shown.
@ -185,6 +185,14 @@ A! c a -- Indirect C!
|
|||||||
A@* -- a Address for A@ word
|
A@* -- a Address for A@ word
|
||||||
A!* -- a Address for A! word
|
A!* -- a Address for A! word
|
||||||
AMOVE src dst u -- Same as MOVE, but with A@ and A!
|
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
|
# Arithmetic / Bits
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user