- WORD p_literal_string,'S"',fasm
- ;; " (fool emacs)
- ;; ( -- chars* n )
- ;; Push the value of successor cell onto stack, and skip it
+ WORD p_literal_string,'S"',fasm,IMMEDIATE ;; " (fool emacs)
+ ;; ( -- char* n )
+ ;; Save string on heap to make available at interpretation
+ ;; not for interactive use!!
+ cmp qword [p_state_DFA],0
+ je p_literal_string_executing
+ pushr rsi
+ mov rdi,qword [p_here_DFA]
+ mov qword [rdi],p_literal_string
+ add rdi,8
+ mov qword [p_here_DFA],rdi
+ DOFORTH p_double_quote
+ pop rcx
+ pop rsi
+ mov rdi,qword [p_here_DFA]
+ mov qword [rdi],rcx
+ add rdi,8
+p_literal_string_copy:
+ dec rcx
+ jl p_literal_string_copied
+ movsb
+ jmp p_literal_string_copy
+p_literal_string_copied:
+ mov qword [p_here_DFA],rdi
+ popr rsi
+ next
+
+p_literal_string_executing: