X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=wordlists.asm;h=0ee7aecedb83c134e75a86d0f82f30661015a27b;hb=39427aee877cab09feea798b146e06dc7bfc25cc;hp=7daa4289c964b501314d40dbb21f4609d92fc480;hpb=f2b2acd5d5c79e2d65854eef7e23f7323bc6c4f2;p=rrq%2Frrqforth.git diff --git a/wordlists.asm b/wordlists.asm index 7daa428..0ee7aec 100644 --- a/wordlists.asm +++ b/wordlists.asm @@ -14,6 +14,30 @@ ;; CURRENT-WORDLIST points to dfa of the currently active wordlist. dq p_forth_DFA ; compilation word list + WORD p_definitions,'DEFINITIONS',fasm + ;; ( wordlist -- ) + ;; Change CURRENT-WORDLIST to use the given word list + pop qword [p_wordlist_DFA] + next + + WORD p_use,'USE',fasm + ;; ( wordlist "name" -- cfa ) + ;; Read next word using the given wordlist + pushr rsi + mov rax,qword [p_wordlist_DFA] + pushr rax + pop qword [p_wordlist_DFA] + DOFORTH p_input, p_get, p_read_word, p_find + popr rax + mov qword [p_wordlist_DFA],rax + cmp qword [rsp],0 + jne p_use_done + add rsp,16 + mov qword [rsp],0 +p_use_done: + popr rsi + next + WORD p_words,'WORDS',fasm ;; ( w -- ) ;; Dump all words of the word list w (the dfa of a word list)