some new words
[rrq/rrqforth.git] / reference.html
index a1de89cbf7de1fde99526c0439f3bba94bdd8a81..988e55177cc3476fd286dc94d7b0324a2893bef9 100644 (file)
@@ -806,6 +806,7 @@ asciidoc.install();
 <a href="#p_create">CREATE</a> &#160;\r
 <a href="#p_current_wordlist">CURRENT-WORDLIST</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_decimal">DECIMAL</a> &#160;\r
+<a href="#p_definitions">DEFINITIONS</a> &#160;\r
 <a href="#p_depth">DEPTH</a> &#160;\r
 <a href="#p_digits">DIGITS</a> &#160;\r
 <a href="#p_divmod">/MOD</a> &#160;\r
@@ -858,6 +859,7 @@ asciidoc.install();
 <div class="paragraph"><p><a href="#p_read_stream_char">READ-STREAM-CHAR</a> &#160;\r
 <a href="#p_read_word">READ-WORD</a> &#160;\r
 <a href="#p_realloc">REALLOC</a> &#160;\r
+<a href="#p_return">RETURN</a> &#160;\r
 <a href="#p_roll">ROLL</a> &#160;\r
 <a href="#p_rot">ROT</a> &#160;\r
 <a href="#p_rbp">RSP</a> &#160;</p></div>\r
@@ -882,7 +884,8 @@ asciidoc.install();
 <a href="#p_this_word">THIS-WORD</a> &#160;\r
 <a href="#p_true">TRUE</a> &#160;\r
 <a href="#p_tuck">TUCK</a> &#160;</p></div>\r
-<div class="paragraph"><p><a href="#p_unstream">UNSTREAM</a> &#160;</p></div>\r
+<div class="paragraph"><p><a href="#p_unstream">UNSTREAM</a> &#160;\r
+<a href="#p_use">USE</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_verboseQ">VERBOSE?</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_within">WITHIN</a> &#160;\r
 <a href="#p_words">WORDS</a> &#160;</p></div>\r
@@ -1655,6 +1658,27 @@ _______________________________________________________
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_definitions"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_definitions">Word: DEFINITIONS</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( wordlist -- )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"DEFINITIONS" is a function word that installs the given wordlist as\r
+the <a href="#p_current_wordlist">CURRENT-WORDLIST</a> one.</p></div>\r
+<div class="exampleblock">\r
+<div class="content">\r
+<div class="sidebarblock">\r
+<div class="content">\r
+<div class="title">Definition concept for DEFINITIONS</div>\r
+<div class="paragraph"><p>: DEFINITIONS CURRENT-WORDLIST ! ;</p></div>\r
+</div></div>\r
+</div></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_depth"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -2133,11 +2157,10 @@ _______________________________________________________
 <h3 id="_word_exit">Word: EXIT</h3>\r
 <div class="literalblock">\r
 <div class="content">\r
-<pre><code>Data stack: ( -- )</code></pre>\r
+<pre><code>Data stack: ( -- )</code></pre>\r
 </div></div>\r
-<div class="paragraph"><p>"EXIT" is a function word that implements the ending of a FORTH\r
-definition and its threading to the subsequent step of the calling\r
-definition.</p></div>\r
+<div class="paragraph"><p>"EXIT" is a function word that terminates the <code>rrqforth</code> process\r
+immediately with the given exit code.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -2966,6 +2989,20 @@ kernel, and the granularity is in pages, i.e. a multiple of 4 kb.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_return"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_return">Word: RETURN</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( -- )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"RETURN" is a function word that implements the ending of a FORTH\r
+definition and make execution return to the next step in the calling\r
+definition.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p>compile.asm:    WORD p_right_bracket,<em>]</em>,fasm</p></div>\r
 <div class="paragraph"><p><a id="p_right_bracket"></a></p></div>\r
 </div>\r
@@ -3483,10 +3520,26 @@ at (stream* + 16) is its size.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
-<div class="paragraph"><p><a id="p_verboseQ"></a></p></div>\r
+<div class="paragraph"><p><a id="p_use"></a></p></div>\r
 </div>\r
 </div>\r
 <div class="sect2">\r
+<h3 id="_word_use">Word: USE</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data value: ( wordlist -- )  Input stream: word</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"USE" is a function word that looks up next word given the wordlist.\r
+It reads next word on <a href="#p_input">INPUT</a> via <a href="#p_read_word">READ-WORD</a>,\r
+then temporarily changes <a href="#p_current_wordlist">CURRENT-WORDLIST</a> to\r
+<a href="#p_find">FIND</a> the word via the given wordlist, and returns the TFA\r
+of that word, or just 0 if the word coudn&#8217;t be found.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
+<div class="paragraph"><p><a id="p_verboseQ"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
 <h3 id="_word_verbose">Word: VERBOSE?</h3>\r
 <div class="literalblock">\r
 <div class="content">\r
@@ -3575,7 +3628,7 @@ is deepest.</p></div>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-06-06 09:36:53 AEST\r
+ 2021-06-06 23:19:36 AEST\r
 </div>\r
 </div>\r
 </body>\r