X-Git-Url: https://git.kengrimes.com/?p=watForth.git;a=blobdiff_plain;f=forth.forth;h=e7dc22974c155f5366adf97e19e9d52b049b4446;hp=db765e05ec5c5b2b195be5cf096facb37c7b5395;hb=d30761f3974c9a6ccc543392c20060885ca91a36;hpb=9a5c53df66d6f68395d9b11084482a7b1edf265e diff --git a/forth.forth b/forth.forth index db765e0..e7dc229 100644 --- a/forth.forth +++ b/forth.forth @@ -1,3 +1,15 @@ +\ 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 . word ' here define word word find , word find find , word ; find , word : here define @@ -5,8 +17,12 @@ word : here define : IWRITE-MODE ' dup , ' JNZ: , here 12 + , ' 2drop , ' ; , ' 2dup , ' find , ' dup , ' JZ: , here 16 + , ' , , ' 2drop , ' ; , ' drop , ' LIT , ' LIT , ' , , 16720 , ' , , ' ; , -: ^i ' LIT , ' MODE , ' LIT , ' IWRITE-MODE , ' ! , ' ; , -: ^e ' LIT , ' MODE , ' LIT , ' EXECUTE-MODE , ' ! , ' ; , -: test \^i 20 20 + ; \^e -test . -5 . +: i ' LIT , ' MODE , ' LIT , ' IWRITE-MODE , ' ! , ' ; , +: e ' LIT , ' MODE , ' LIT , ' EXECUTE-MODE , ' ! , ' ; , +\i +\: FINISH-STRING DROP STRING-END ; +\: " STRING-START +\: KEYPUMP KEY 34 =? JNZ: FINISH-STRING STRING-PUT JMP: KEYPUMP +\e +" watForth-32 Interactive CLI: +" .s