better documentation
[rrq/rrqforth.git] / reference.html
index 9900bbd6523455f03232be79b6944e426f725a5e..988e55177cc3476fd286dc94d7b0324a2893bef9 100644 (file)
@@ -801,10 +801,12 @@ asciidoc.install();
 <a href="#p_begin">BEGIN</a> &#160;\r
 <a href="#p_break">BREAK</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_cfa2flags_get">CFA&gt;FLAGS@</a> &#160;\r
+<a href="#p_cfa2tfa">CFA&gt;TFA</a> &#160;\r
 <a href="#p_clear_stream">CLEAR-STREAM</a> &#160;\r
 <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
@@ -857,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
@@ -871,6 +874,7 @@ asciidoc.install();
 <a href="#p_swap">SWAP</a> &#160;\r
 <a href="#p_system">SYSTEM</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_tell">TELL</a> &#160;\r
+<a href="#p_dot_temp">.TEMP</a> &#160;\r
 <a href="#p_terminate0">TERMINATE0</a> &#160;\r
 <a href="#p_tfa2cfa">TFA&gt;CFA</a> &#160;\r
 <a href="#p_tfa2dfa">TFA&gt;DFA</a> &#160;\r
@@ -880,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
@@ -1133,6 +1138,26 @@ at the current free head address, which also is incremented.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_cfa2tfa"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_cfa_gt_tfa">Word: CFA&gt;TFA</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( cfa -- tfa )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"CFA&gt;TFA" is a function word that pushes word tfa of the given cfa.</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 CFA&gt;TFA</div>\r
+<div class="paragraph"><p>: CFA&gt;TFA 14 - @ ;</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_Cget"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -1633,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
@@ -1848,6 +1894,23 @@ the current <a href="#p_base">BASE</a> (either <a href="#p_decimal">DECIMAL</a>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_dot_temp"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_temp">Word: .TEMP</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( v -- char* n )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>".TEMP" is a function word that renders a cell value as an integer\r
+using the current <a href="#p_base">BASE</a>, which is either\r
+<a href="#p_decimal">DECIMAL</a> or <a href="#p_hex">HEX</a>. In <a href="#p_decimal">DECIMAL</a>\r
+<a href="#p_base">BASE</a>, a negative value is rendered as such with a leading\r
+minus sign, whereas <a href="#p_hex">HEX</a> <a href="#p_base">BASE</a> rendering is\r
+unsigned.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_double_quote"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -2094,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
@@ -2927,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
@@ -3444,8 +3520,24 @@ 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
@@ -3536,7 +3628,7 @@ is deepest.</p></div>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-06-05 17:42:39 AEST\r
+ 2021-06-06 23:19:36 AEST\r
 </div>\r
 </div>\r
 </body>\r