diff --git a/blk/395 b/blk/395 new file mode 100644 index 0000000..6249a9e --- /dev/null +++ b/blk/395 @@ -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 ; diff --git a/cvm/forth.bin b/cvm/forth.bin index 450a7a9..c7d1ca8 100644 Binary files a/cvm/forth.bin and b/cvm/forth.bin differ diff --git a/doc/dict.txt b/doc/dict.txt index cb2e6d1..81f8150 100644 --- a/doc/dict.txt +++ b/doc/dict.txt @@ -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