bug fixes
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 28 May 2021 04:05:58 +0000 (14:05 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Fri, 28 May 2021 04:05:58 +0000 (14:05 +1000)
compile.asm

index 8a86f06c58a8356cabc1ab15bd036b669174f0fc..fa850d404f16c15b96aa2b6b7df3c1f450c51143 100644 (file)
@@ -30,7 +30,6 @@ p_create_COPY:
        mov qword [rdi],0       ; OFF
        add rdi,8
        mov qword [rbx+8],rdi   ; pCFA
-       add rdi,8
        mov qword [rdi],dovariable ; CFA
        add rdi,8
        mov qword [p_here_DFA],rdi ; allocate the space
@@ -249,16 +248,17 @@ p_evaluate_stream_LOOP:
        dq p_get
        BRANCH 0,p_evaluate_stream_INTERPRET
        dq p_dup
-       dq p_cfa2flags_get
-       dq p_literal, 1
+       dq p_tfa2flags_get
+       dq p_literal, 1 ; the immediate bit
        dq p_and
-       dq p_not
-       BRANCH 0,p_evaluate_stream_INTERPRET
-       dq p_comma
-       BRANCH ,p_evaluate_stream_AFTER
+       BRANCH 0,p_evaluate_stream_COMPILE
 p_evaluate_stream_INTERPRET:
+       dq p_tfa2cfa
        dq p_execute
        BRANCH ,p_evaluate_stream_AFTER
+p_evaluate_stream_COMPILE:
+       dq p_comma
+       BRANCH ,p_evaluate_stream_AFTER
 p_evaluate_stream_NOTWORD:
        dq p_drop
        dq p_number
@@ -294,12 +294,14 @@ p_evaluate_stream_BAD:
        dq p_right_bracket
        dq p_exit
 
-       WORD p_semicolon,';'
+       WORD p_semicolon,';',,IMMEDIATE
        ;; ( -- )
        ;; Lay out p_exit, and set interpreting mode
        dq p_left_bracket
        dq p_literal, p_exit
        dq p_comma
+       dq p_left_bracket
+       dq p_exit
 
        WORD p_immediate,'IMMEDIATE',fasm,IMMEDIATE
        ;; ( -- )