+ WORD p_semicolon,';',,IMMEDIATE
+ ;; ( -- )
+ ;; Lay out p_return, and set interpreting mode
+ dq p_literal, p_return, p_comma, p_left_bracket, p_return
+
+ 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
+
+ WORD p_load_buffer_size,'LOAD-BUFFER-SIZE',dovariable
+ ;; ( -- a )
+ ;; The buffer size (in bytes) used by LOAD-FILE
+ dq 15000
+
+ WORD p_open_file,'OPEN-FILE',fasm
+ ;; ( chaz* n -- fd )
+ ;; Open the nominated file
+ pushr rsi
+ add rsp,8 ; drop n ... assuming NUL-ended string
+ push qword 0
+ push qword 0
+ DOFORTH sys_open
+ popr rsi
+ next
+
+ WORD p_load_file,'LOAD-FILE'
+ ;; ( chaz* n -- )
+ dq p_open_file
+ dq p_dup, p_0less
+ BRANCH 1,p_load_file_badfile
+ dq p_load_buffer_size, p_get
+ dq p_stream, p_dup, p_gtR
+ dq p_evaluate_stream
+ dq p_Rgt, p_unstream
+ BRANCH ,p_load_file_exit
+p_load_file_badfile:
+ dq p_literal_string
+ STRING '** open file error: '
+ dq p_tell, p_dot, p_nl, p_emit
+ dq p_literal,1
+p_load_file_exit:
+ dq p_return