minimal

Minimal Forth Workbench provides an educational subset of Standard Forth, feel free to experiment.



\ Minimal Forth Workbench: more memory operators        uh 2015-10-15

: 2! ( d addr -- )   SWAP OVER ! CELL+ ! ;
: 2@ ( addr -- d )  DUP CELL+ @ SWAP @ ;

: +! ( x addr -- )  SWAP OVER @ + SWAP ! ;

: CMOVE ( c-addr1 c-addr2 u -- )
   BEGIN ( c-addr1 c-add2 u )
     DUP
   WHILE ( c-addr1 c-addr2 u )
      >R  OVER C@  OVER C!   SWAP CHAR+ SWAP CHAR+  R> 1 -
   REPEAT ( c-add1 c-add2 u )
   DROP DROP DROP ;

by UlrichHoffmann

avatar of UlrichHoffmann

Versions

1.1.1, 1.1.0, 1.0.0

Download current as zip

Tags

ansforth94, forth-94, forth-2012

Dependencies

None

Dependents

None