;segment readable executable
+include 'signals.asm'
+
;;; At fasm compilation: reset previous_word to make a new word list
;;; Words above belong to the SYSTEM wordlist, and the following
;;; belong to the FORTH wordlist.
;; Initial rsp points to the arguments block of size (64 bits)
;; followed by the argument pointers.
mov qword [p_args_DFA],rsp
+ mov rbp,RS_TOP
+ call p_setup_signals_DFA
call main_is_verbose
mov qword [p_verboseQ_DFA],rdx
jmp p_quit_DFA ; QUIT
;; return boolean in rdx
;; implementation for that 2 byte asciiz string
main_is_verbose_data:
- dq main_is_verbose_data_end - $ ; length of data
db '-v',0
-main_is_verbose_data_end:
main_is_verbose:
mov rbx,qword [p_args_DFA] ; Pointer to main arguments
- mov r8,qword [rbx]
+ mov r8,qword [rbx] ; r8 = count of pointers
xor rdx,rdx
cld
main_is_verbose_next:
add rbx,8
mov rsi,qword [rbx]
mov rdi,main_is_verbose_data
- lodsq
- mov rcx,rax
main_is_verbose_loop:
cmpsb
jne main_is_verbose_next
- dec rcx
- jg main_is_verbose_loop
+ cmp byte[rsi-1],0
+ jne main_is_verbose_loop
not rdx
main_is_not_verbose:
ret
dq p_tell
ENDFORTH
mov rbp,RS_TOP ; reset the return stack
- jmp main
+ jmp p_quit_INITIALIZED
;;; ========================================