minimal

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



\ Minimal Forth Workbench: string words                                     uh 2015-10-15

32 CONSTANT BL

: SPACE ( -- )  BL EMIT ;
: SPACES ( u -- ) DUP 0 > IF  0 DO SPACE LOOP   ELSE DROP THEN ;

: COUNT ( addr1 -- addr2 len )  DUP CHAR+ SWAP C@ ;
: TYPE ( addr len -- )  DUP IF  OVER + SWAP DO  I C@ EMIT  LOOP  THEN ;

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