From 492989e5e479cebefe9213a0c350534528d5f819 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Tue, 11 Oct 2016 22:11:56 +1300 Subject: [PATCH] Tidying up after refactor. --- src/forth.jl | 4 +++- src/lib.4th | 2 ++ src/lib_6_strings.4th | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) 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 ) -- 2.20.1