Sfoglia il codice sorgente

core: add AMOVEW

master
Virgil Dupras 3 anni fa
parent
commit
4910b9caef
3 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. +6
    -0
      blk/395
  2. BIN
      cvm/forth.bin
  3. +8
    -0
      doc/dict.txt

+ 6
- 0
blk/395 Vedi 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 Vedi File


+ 8
- 0
doc/dict.txt Vedi 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



Loading…
Annulla
Salva