correction
[rrq/rrqforth.git] / reference.html
index 9cb4b59609eabf30834431443a2a66a96331f340..9137d075cfd0bd68e35fda305d8050d21cc8f636 100644 (file)
@@ -786,7 +786,8 @@ asciidoc.install();
 <a href="#p_gtR">&gt;R</a> &#160;\r
 <a href="#p_Rget">R@</a> &#160;\r
 <a href="#p_Rgt">R&gt;</a> &#160;\r
-<a href="#p_rbpn">R[n]</a> &#160;</p></div>\r
+<a href="#p_rbpn">R[n]</a> &#160;\r
+<a href="#p_dsp">D[n]</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#data_stack">DATA-STACK</a> &#160;\r
 <a href="#return_stack">RETURN-STACK</a> &#160;\r
 &#160;\r
@@ -850,7 +851,9 @@ asciidoc.install();
 <a href="#p_load_buffer_size">LOAD-BUFFER-SIZE</a> &#160;\r
 <a href="#p_load_file">LOAD-FILE</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_args">MAIN-ARGS</a> &#160;\r
-<a href="#p_malloc">MALLOC</a> &#160;</p></div>\r
+<a href="#p_malloc">MALLOC</a> &#160;\r
+<a href="#p_min">MIN</a> &#160;\r
+<a href="#p_max">MAX</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_negate">NEGATE</a> &#160;\r
 <a href="#p_nip">NIP</a> &#160;\r
 <a href="#p_nl">NL</a> &#160;\r
@@ -864,6 +867,7 @@ asciidoc.install();
 <a href="#p_program_version">PROGRAM_VERSION</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_quit">QUIT</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_read_stream_char">READ-STREAM-CHAR</a> &#160;\r
+<a href="#p_read_stream_char">READ-STREAM-LINE</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
@@ -884,7 +888,9 @@ asciidoc.install();
 <div class="paragraph"><p><a href="#p_tell">TELL</a> &#160;\r
 <a href="#p_dot_temp">.TEMP</a> &#160;\r
 <a href="#p_temp.adoc">TEMP</a> &#160;\r
+<a href="#p_tempheld.adoc">TEMPHELD</a> &#160;\r
 <a href="#p_tempspace">TEMPSPACE</a> &#160;\r
+<a href="#p_tempused.adoc">TEMPUSED</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
@@ -1194,6 +1200,19 @@ also is incremented accordingly.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_dsp"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_d_n">Word: D[n]</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( n -- a )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"D[n]" is a function word that pushes the address for the n:th cell of\r
+the data stack onto the data stack.</p></div>\r
+<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
@@ -1396,7 +1415,8 @@ _______________________________________________________
 </div></div>\r
 <div class="paragraph"><p>"ARGS" is a value word that holds a pointer to the command line data\r
 block which consists of a count cell followed by that many asciiz\r
-pointers and then a 0 cell.</p></div>\r
+pointers and then a 0 cell. That is next followed by the environment\r
+as a number of asciiz pointers and a 0 cell.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="listingblock">\r
@@ -1404,9 +1424,10 @@ pointers and then a 0 cell.</p></div>
 <div class="content">\r
 <pre><code>ARGS -&gt; 8 bytes: count of non-zero asciiz pointers following\r
         8 bytes: command name string\r
-        8 bytes: first argument string\r
-        8* ...\r
-        8 zero</code></pre>\r
+        8* bytes: argument strings\r
+        8 bytes: zero cell\r
+        8* bytes: envirnment strings\r
+        8 bytes: zero cell</code></pre>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2754,6 +2775,32 @@ page" of mmap for details.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_max"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_max">Word: MAX</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( v1 v2 -- v3 )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"MAX" is a function word that selects the greatest of v1 and v2. To\r
+that end, the values are 64-bit signed integers.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
+<div class="paragraph"><p><a id="p_min"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_min">Word: MIN</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( v1 v2 -- v3 )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"MIN" is a function word that selects the least of v1 and v2. To that\r
+end, the values are 64-bit signed integers.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_minus"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -3038,8 +3085,8 @@ _______________________________________________________
 <div class="content">\r
 <pre><code>Data stack: ( n -- a )</code></pre>\r
 </div></div>\r
-<div class="paragraph"><p>"R[n]" is a function word that pushes the address for the n:th cell on\r
-the top return stack value onto the data stack.</p></div>\r
+<div class="paragraph"><p>"R[n]" is a function word that pushes the address for the n:th cell of\r
+the return stack onto the data stack.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="sidebarblock">\r
@@ -3069,6 +3116,22 @@ instead.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_read_stream_line"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_read_stream_line">Word: READ-STREAM-LINE</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( stream -- n )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"READ-STREAM-LINE" is a function word that gets the next line from the\r
+given stream buffer into PAD and returns number of characters. If the\r
+stream is backed by a file descriptor, the stream buffer is refilled\r
+from there as needed, by a SYS_READ call when more characters are\r
+needed.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_read_word"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -3490,6 +3553,22 @@ small and short-lived data areas.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_tempheld"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_tempheld">Word: TEMPHELD</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( -- a )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"TEMPHELD" is a variable word that keeps the lowest offset of the\r
+<a href="#p__tempspace">TEMPSPACE</a> space to reuse upon cycling. The space\r
+below TEMPHELD is "held" in the sense of not being reused upon\r
+cycling. An application may change the TEMPSPACE offset as needed to\r
+dynamically preserve memory longer term.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_tempspace"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -3523,6 +3602,22 @@ overlapping a prior request.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_tempused"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_tempused">Word: TEMPUSED</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: ( -- a )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"TEMPUSED" is a variable word that keeps the lowest offset of the\r
+<a href="#p__tempspace">TEMPSPACE</a> space to use next as temporary space. This\r
+is advance upon each allocation via <a href="#p_temp">TEMP</a>, and recycled back\r
+to <a href="#p_tempheld">TEMPHELD</a> when next allocation otherwise would exceed\r
+the space size.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_terminate0"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -3830,7 +3925,7 @@ is deepest.</p></div>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-06-12 22:46:13 AEST\r
+ 2021-06-17 17:12:21 AEST\r
 </div>\r
 </div>\r
 </body>\r