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  BEGIN DUP WHILE  SPACE 1 -  REPEAT  THEN  DROP ;

: COUNT ( addr1 -- addr2 len )  DUP CHAR+ SWAP C@ ;
: TYPE ( addr len -- )  BEGIN DUP WHILE  SWAP COUNT EMIT  SWAP 1 -  REPEAT 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