\ This program is free software: you can redistribute it and/or modify \ it under the terms of the GNU General Public License as published by \ the Free Software Foundation, either version 3 of the License, or \ (at your option) any later version. \ \ This program is distributed in the hope that it will be useful, \ but WITHOUT ANY WARRANTY; without even the implied warranty of \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \ GNU General Public License for more details. \ \ You should have received a copy of the GNU General Public License \ along with this program. If not, see . 16500 execute WORD 16500 29 execute word DEFINE 29 29 execute \ word EXECUTE 12 define word RINIT 3 define word NOOP 13 define word MODE 14336 define word EXECUTE-MODE 16680 define word EXECUTE-NUM 16720 define word INTERPRET 16400 define word KEY 5 define word WORD-START 20 define word WORD-PUT 19 define word WORD-END 23 define word STRING-START 39 define word STRING-PUT 40 define word STRING-END 41 define word NUMBER 22 define word FIND 21 define word FIND-DOES 44 define word DEFINE-DOES 45 define word QUIT 16384 define word BYE 25 define word WORDS 27 define word !CHANNEL 35 define word !HERE 36 define word HERE 28 define word ; 1 define word JZ: 14 define word JNZ: 15 define word J-1: 24 define word JMP: 18 define word , 33 define word + 7 define word - 34 define word =? 37 define word WS? 17 define word . 9 define word .S 38 define word @ 10 define word @+ 42 define word ! 11 define word !+ 43 define word LIT 2 define word DUP 6 define word 2DUP 30 define word DROP 16 define word 2DROP 32 define word SWAP 26 define word ROT 31 define word ' here define word word find , word find find , word ; find , word : here define ' word , ' here , ' define , ' ; , ' : dup define-does : IWRITE-MODE ' dup , ' JNZ: , here 12 + , ' 2drop , ' ; , ' 2dup , ' find , ' dup , ' JZ: , here 16 + , ' , , ' 2drop , ' ; , ' drop , ' LIT , ' LIT , ' , , ' EXECUTE-NUM , ' , , ' ; , : i ' LIT , ' MODE , ' LIT , ' IWRITE-MODE , ' ! , ' ; , \i \: e LIT MODE LIT EXECUTE-MODE ! ; \: :> word find here define-does ; \' :> \dup \define-does \: FINISH-" DROP STRING-END ; \: " STRING-START \: KLOOP KEY 34 =? JNZ: FINISH-" STRING-PUT JMP: KLOOP \:> " " swap lit lit , , lit lit , , ; \: IF JZ: \here \8 \+ \, ; word 2drop ; \:> IF \: DOIF LIT JZ: , HERE DUP , ; \: ELSE ; \:> ELSE \: DOELSE LIT JMP: , HERE DUP , SWAP HERE ! ; \: THEN ; \:> THEN \: DOTHEN HERE ! ; \: COMPILE-MODE dup \doif 2dup find dup \doif dup find-does dup \doif swap drop rot 2drop execute ; \dothen drop , 2drop ; \dothen drop lit lit , execute-num , ; \dothen 2drop ; \: c LIT MODE LIT COMPILE-MODE ! ; \: DO" \e " watForth-32 Interactive CLI: " .s