kolibrios/programs/develop/SPForth/devel/~mak/want.f
Kirill Lipatov (Leency) 09488af869 KolSPForth12 uploaded to SVN
git-svn-id: svn://kolibrios.org@4867 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-04-21 19:22:58 +00:00

22 lines
447 B
Forth

REQUIRE [IF] ~mak/CompIF.f
REQUIRE $! ~mak\place.f
REQUIRE [IFNDEF] ~nn\lib\ifdef.f
[IFNDEF] PARSE-WORD
: PARSE-WORD NextWord ;
[THEN]
CREATE WANT_BUFF 0x101 ALLOT
CREATE WANT_FILE 0x101 ALLOT
S" ~mak\do_want.f" WANT_FILE $!
: [WANT] ( addr len -- addr len | )
2DUP PARSE-WORD COMPARE
IF POSTPONE \ EXIT THEN
2DROP INTERPRET \EOF ;
: WANT ( -- )
PARSE-WORD WANT_BUFF $!
WANT_FILE COUNT INCLUDED ;