From: Tim Vaughan Date: Tue, 11 Oct 2016 09:11:56 +0000 (+1300) Subject: Tidying up after refactor. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=492989e5e479cebefe9213a0c350534528d5f819;p=forth.jl.git Tidying up after refactor. --- diff --git a/src/forth.jl b/src/forth.jl index 6afe492..a1a4799 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -1243,7 +1243,9 @@ INCLUDED_CFA = defWord("INCLUDED", BRANCH_CFA, -14, # Loop SOURCE_ID_VAR_CFA, FETCH_CFA, CLOSE_FILE_CFA, DROP_CFA, # Close file - SOURCE_ID_VAR_CFA, STORE_CFA, # Restore input source + SOURCE_ID_VAR_CFA, STORE_CFA, # Restore input source + LIT_CFA, 0, NUMIB_CFA, STORE_CFA, # Zero #IB + LIT_CFA, 0, TOIN_CFA, STORE_CFA, # Zero >IN EXIT_CFA]) INCLUDE_CFA = defWord("INCLUDE", [LIT_CFA, 32, WORD_CFA, diff --git a/src/lib.4th b/src/lib.4th index 60d7a56..86731cf 100644 --- a/src/lib.4th +++ b/src/lib.4th @@ -15,3 +15,5 @@ include lib_7_variables.4th include lib_8_vocab.4th include lib_9_decompiler.4th include lib_10_misc.4th + +.( done.) cr diff --git a/src/lib_6_strings.4th b/src/lib_6_strings.4th index 56a2174..16d8001 100644 --- a/src/lib_6_strings.4th +++ b/src/lib_6_strings.4th @@ -45,11 +45,11 @@ 0 , ( dummy length - we don't know what it is yet ) BEGIN - >IN @ #IB @ >= IF \ End of TIB? + >IN @ #IB @ >= IF \ End of IB? QUERY-INPUT \ Get next line THEN - IB >IN @ + @ 1 >IN +! \ Get char from TIB + IB >IN @ + @ 1 >IN +! \ Get char from IB DUP [CHAR] " <> WHILE @@ -73,11 +73,11 @@ right-paren to the terminal. ) : .( BEGIN - >IN @ #IB @ >= IF \ End of TIB? + >IN @ #IB @ >= IF \ End of IB? QUERY-INPUT \ Get next line THEN - IB >IN @ + @ 1 >IN +! \ Get char from TIB + IB >IN @ + @ 1 >IN +! \ Get char from IB DUP [CHAR] ) = IF DROP ( drop the double quote character )