formatting/prettiness
[watForth.git] / forth.forth
index db765e0..e7dc229 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
 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