;; Pointer to initial argument block
dq 0 ; *(int argc,(char*[argc]) argv)
-;;; The main entry point.
+ WORD p_lparen,'(',fasm,IMMEDIATE
+ pushr rsi
+p_lparen_loop:
+ DOFORTH p_stdin, p_read_word
+ pop rax
+ pop rbx
+ cmp rax,0 ; end of stream
+ je p_lparen_exit
+ cmp rax,1
+ jne p_lparen_loop
+ push rbx
+ push qword ')'
+ push 1
+ DOFORTH p_strncmp
+ pop rax
+ cmp rax,0
+ jne p_lparen_loop
+p_lparen_exit:
+ popr rsi
+ next
+
+;;; ******** The main entry point. ********
main:
;; Initial rsp points to the arguments block of size (64 bits)
;; followed by the argument pointers.