From 03f8e1c9c78e7247de10de9d5f12cbd5631e939c Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 26 May 2021 13:55:15 +1000 Subject: [PATCH] add IMMEDIAET and handle it --- compile.asm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/compile.asm b/compile.asm index 8102cbc..8a86f06 100644 --- a/compile.asm +++ b/compile.asm @@ -225,7 +225,7 @@ p_numper_POSITIVE: ;; ( stream* -- *?* flag ) ;; Execute the words from the given stream ;; returns 1 if stream ends and 0 if an unknown word is found - dq p_ltR ; Keep the stream on the return stack. + dq p_gtR ; Keep the stream on the return stack. p_evaluate_stream_PROMPT: dq p_depth dq p_dot @@ -263,6 +263,11 @@ p_evaluate_stream_NOTWORD: dq p_drop dq p_number BRANCH 0,p_evaluate_stream_BAD ; branch if 0 + dq p_state + dq p_get + BRANCH 0,p_evaluate_stream_AFTER ; branch if 0 + dq p_literal, p_literal + dq p_comma, p_comma p_evaluate_stream_AFTER: dq p_Rget dq p_stream_nchars @@ -295,3 +300,11 @@ p_evaluate_stream_BAD: dq p_left_bracket dq p_literal, p_exit dq p_comma + + WORD p_immediate,'IMMEDIATE',fasm,IMMEDIATE + ;; ( -- ) + ;; Set "immediate flag" of the word being defined + mov rax,qword [p_wordlist_DFA] + mov rax,qword [rax] ; tfa of most recent word + mov qword [rax+16],1 ; set the flags field to 1 + next -- 2.39.2