fix terminating NUL on the captured string
[rrq/rrqforth.git] / reference.html
index f57f5c8805811feb0fa67dcb88aee1b7a7ee5d6d..609c422d1f31238ff88134fad393ef226287787e 100644 (file)
@@ -793,6 +793,7 @@ asciidoc.install();
 <a href="#p_2over">2OVER</a> &#160;\r
 <a href="#p_2swap">2SWAP</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_abs">ABS</a> &#160;\r
+<a href="#p_again">AGAIN</a> &#160;\r
 <a href="#p_allot">ALLOT</a> &#160;\r
 <a href="#p_and">AND</a> &#160;\r
 <a href="#inline_code">[ASM]</a> &#160;</p></div>\r
@@ -832,7 +833,8 @@ asciidoc.install();
 <div class="paragraph"><p><a href="#p_if">IF</a> &#160;\r
 <a href="#p_ifagain">IFAGAIN</a> &#160;\r
 <a href="#p_ifbreak">IFBREAK</a> &#160;\r
-<a href="#p_immediate">IMMEDIATE</a> &#160;</p></div>\r
+<a href="#p_immediate">IMMEDIATE</a> &#160;\r
+<a href="#p_input">INPUT</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_literal">LIT</a> &#160;\r
 <a href="#p_load_file_quote">LOAD-FILE"</a> &#160;</p></div>\r
 <div class="paragraph"><p><a href="#p_args">MAIN-ARGS</a> &#160;\r
@@ -905,6 +907,8 @@ RRQFORTH executon by means of the following instruction sequence:</p></div>
 forthcode:</code></pre>\r
 </div></div>\r
 </div></div>\r
+<div class="paragraph"><p>Note that the FORTH compiler does not invoke an assembler so any\r
+inline assembly code must be provided in its binary form.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -921,6 +925,15 @@ means of optionally adding the subsequent branch offset, or not, to
 the point of execution. If the value, v, is 0 then the branch offset\r
 is added, and otherwise execution continues with the cell following\r
 the branch offset in the definition.</p></div>\r
+<div class="paragraph"><p>Note that the branch offset is a byte count and each FORTH word of a\r
+definition take up a cell of 8 bytes. The offset is relative to the\r
+cell address immediately subsequent to the offset cell. In other\r
+words, offset 0 is not branching anywhere and an offset of -16 would\r
+make a tight loop back to the branch instruction itself. The latter\r
+would pull data stack values until and including the first non-zero\r
+value.</p></div>\r
+<div class="paragraph"><p>See also <a href="#p_1branch">1BRANCH</a>, <a href="#p_branch">BRANCH</a>, <a href="#p_if">IF</a>,\r
+<a href="#p_else">ELSE</a>, <a href="#p_ifbreak">IFBREAK</a> and <a href="#p_ifagain">IFAGAIN</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -935,7 +948,7 @@ _______________________________________________________
 <div class="paragraph"><p>"0=" is a function word that replaces a value with its logical\r
 complement; the result is zero if the value non-zero, and the result\r
 is non-zero if the value is zero.</p></div>\r
-<div class="paragraph"><p>Compare with <a href="#p_not">NOT</a>.</p></div>\r
+<div class="paragraph"><p>This is the same function as <a href="#p_not">NOT</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -951,14 +964,13 @@ _______________________________________________________
 less than 0, and 0 otherwise.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 1: Word: 0&lt;</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: 0= 0 SWAP &lt; ;</code></pre>\r
+<div class="title">Definition concept for 0&lt;</div>\r
+<div class="paragraph"><p>( v&#8201;&#8212;&#8201;0/1 ) : 0= 0 SWAP &lt; ;</p></div>\r
 </div></div>\r
 </div></div>\r
-<div class="paragraph"><p>See also <a href="#p_swap">SWAP</a> and\r
-<a href="#p_lessthan">&lt;</a>.</p></div>\r
+<div class="paragraph"><p>See also <a href="#p_swap">SWAP</a> and <a href="#p_lessthan">&lt;</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -975,6 +987,14 @@ means of optionally adding the subsequent branch offset, or not, to
 the point of execution. If the value, v, is non-zero then the branch\r
 offset is added, and otherwise execution continues with the cell\r
 following the branch offset in the definition.</p></div>\r
+<div class="paragraph"><p>Note that the branch offset is a byte count and each FORTH word of a\r
+definition take up a cell of 8 bytes. The offset is relative to the\r
+cell address immediately subsequent to the offset cell. In other\r
+words, offset 0 is not branching anywhere and an offset of -16 would\r
+make a tight loop back to the branch instruction itself. The latter\r
+would pull data stack values until and including the first zero value.</p></div>\r
+<div class="paragraph"><p>See also <a href="#p_0branch">0BRANCH</a>, <a href="#p_branch">BRANCH</a>, <a href="#p_if">IF</a>,\r
+<a href="#p_else">ELSE</a>, <a href="#p_ifbreak">IFBREAK</a> and <a href="#p_ifagain">IFAGAIN</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1003,10 +1023,10 @@ _______________________________________________________
 stack.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 2: Word: 2DUP</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: 2DUP OVER OVER ;</code></pre>\r
+<div class="title">Definition concept for 2DUP</div>\r
+<div class="paragraph"><p>( v1 v2&#8201;&#8212;&#8201;v1 v2 v1 v2 ) : 2DUP OVER OVER ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -1039,10 +1059,10 @@ onto the top of the data stack. This is similar to <a href="#p_over">OVER</a> bu
 working with cell pairs rather than single cells.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 3: Word: 2OVER</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: 2OVER 3 PICK 3 PICK ;</code></pre>\r
+<div class="title">Definition concept for 2OVER</div>\r
+<div class="paragraph"><p>( v1 v2 v3 v4&#8201;&#8212;&#8201;v1 v2 v3 v4 v1 v2 ) : 2OVER 3 PICK 3 PICK ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -1075,10 +1095,10 @@ the upper and lower pair. This is similar to <a href="#p_swap">SWAP</a> but
 working with cell pairs rather than single cells.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 4: Word: 2SWAP</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: 2SWAP 3 ROLL 3 ROOL ;</code></pre>\r
+<div class="title">Definition concept for 2SWAP</div>\r
+<div class="paragraph"><p>( v1 v2 v3 v4&#8201;&#8212;&#8201;v3 v4 v1 v2 ) : 2SWAP 3 ROLL 3 ROLL ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -1097,10 +1117,10 @@ _______________________________________________________
 at the current free head address, which also is incremented.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 5: Word: C,</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: C, HERE @ 1 ALLOT C! ;  ( v -- ; Claim 1 byte and put lsb value there )</code></pre>\r
+<div class="title">Definition concept for C,</div>\r
+<div class="paragraph"><p>: C, HERE @ 1 ALLOT C! ;  ( v&#8201;&#8212;&#8201;; Claim 1 byte and put lsb value there )</p></div>\r
 </div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_colon">:</a>, <a href="#p_comma">[p_comma]</a>. <a href="#p_here">HERE</a>, <a href="#p_get">@</a>,\r
@@ -1172,6 +1192,23 @@ value. To that end, the values are 64-bit signed integers.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_again"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_again">Word: AGAIN</h3>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><code>Data stack: Compiling: ( -- a )</code></pre>\r
+</div></div>\r
+<div class="paragraph"><p>"AGAIN" is an immediate function word that is used together with\r
+<a href="#p_begin">BEGIN</a> and instead of <a href="#p_end">END</a> to implement structured\r
+execution control. AGAIN scans the datastack for the nearest preceding\r
+BEGIN marker and lays out an unconditional branch from this point the\r
+beginning of the block during execution. It thereafter performs the\r
+<a href="#p_end">END</a> compile action to end the block.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_allot"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -1253,10 +1290,6 @@ numerical base is set to 10 or 16 by <a href="#p_decimal">DECIMAL</a> and
 supported.</p></div>\r
 <div class="paragraph"><p>See also <a href="#p_digits">DIGITS</a>, which holds the mapping table from\r
 digits to text.</p></div>\r
-<div class="exampleblock">\r
-<div class="content">\r
-<div class="paragraph"><div class="title">Usage example 3: claim 16 bytes for variable FOO</div><p>CREATE FOO BASE</p></div>\r
-</div></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1274,6 +1307,25 @@ implement structured execution control. BEGIN simply places the
 address for resolving branches back to this point during execution,\r
 and then a 0 as a marker so as to allow for an unknown number of block\r
 exit points.</p></div>\r
+<div class="exampleblock">\r
+<div class="content">\r
+<div class="listingblock">\r
+<div class="title">Usage example 3:</div>\r
+<div class="content">\r
+<pre><code>: WTELL ( tfa -- ; Print word pname )\r
+  24 + DUP 8 + SWAP @ TELL SP EMIT\r
+;\r
+\r
+: WORDS ( wordlist -- ; Print all words of word list )\r
+  BEGIN\r
+    @ DUP 0= IFBREAK\r
+    DUP WTELL\r
+  END\r
+  DROP\r
+  NL EMIT\r
+;</code></pre>\r
+</div></div>\r
+</div></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1287,6 +1339,14 @@ _______________________________________________________
 </div></div>\r
 <div class="paragraph"><p>"[']" is an immediate function word that reads the next word on the\r
 input stream and pushes its 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 [']</div>\r
+<div class="paragraph"><p>: ['] IMMEDIATE ' ;</p></div>\r
+</div></div>\r
+</div></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1301,6 +1361,14 @@ _______________________________________________________
 <div class="paragraph"><p>"BRANCH" is a function word that implements execution transfer by\r
 means of adding the subsequent branch offset to the point of\r
 execution.</p></div>\r
+<div class="paragraph"><p>Note that the branch offset is a byte count and each FORTH word of a\r
+definition take up a cell of 8 bytes. The offset is relative to the\r
+cell address immediately subsequent to the offset cell. In other\r
+words, offset 0 is not branching anywhere and an offset of -16 would\r
+make a tight loop back to the branch instruction itself. The latter\r
+would pull data stack values until and including the first zero value.</p></div>\r
+<div class="paragraph"><p>See also <a href="#p_0branch">0BRANCH</a>, <a href="#p_1branch">1BRANCH</a>, <a href="#p_if">IF</a>,\r
+<a href="#p_else">ELSE</a>, <a href="#p_ifbreak">IFBREAK</a> and <a href="#p_ifagain">IFAGAIN</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1313,6 +1381,28 @@ branch out of an enclosing xef:p_begin[BEGIN]-<a href="#p_end">END</a> block.
 Similar to <a href="#p_ifbreak">IFBREAK</a> it lays out the branch cell\r
 followed by a reserved cell for the branch offset, and inserts the\r
 resolution address just above the required 0 on the data stack.</p></div>\r
+<div class="exampleblock">\r
+<div class="content">\r
+<div class="listingblock">\r
+<div class="title">Usage example 4: unconditional break with a condition.</div>\r
+<div class="content">\r
+<pre><code>: WTELL ( tfa -- ; Print word pname )\r
+  24 + DUP 8 + SWAP @ TELL SP EMIT\r
+;\r
+\r
+: WORDS ( wordlist -- ; Print all words of word list )\r
+  BEGIN\r
+    @ DUP IF DUP WTELL ELSE BREAK THEN\r
+    1 IFAGAIN\r
+  END\r
+  DROP\r
+  NL EMIT\r
+;</code></pre>\r
+</div></div>\r
+</div></div>\r
+<div class="paragraph"><p>See also <a href="#p_branch">BRANCH</a>, <a href="#p_0branch">0BRANCH</a>,\r
+<a href="#p_1branch">1BRANCH</a>, <a href="#p_if">IF</a>, <a href="#p_else">ELSE</a>,\r
+<a href="#p_ifbreak">IFBREAK</a> and <a href="#p_ifagain">IFAGAIN</a>.</p></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -1373,10 +1463,10 @@ This includes reading the next word for making a new dictionary entry
 and setting evaluation state to compiling mode.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 6: Word: :</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: : doFORTH READ-WORD CREATE TFA&gt;CFA ! ] ;</code></pre>\r
+<div class="title">Definition concept for :</div>\r
+<div class="paragraph"><p>: : doFORTH READ-WORD CREATE TFA&gt;CFA ! ] ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_doforth">doFORTH</a>, <a href="#p_read_word">READ-WORD</a>,\r
@@ -1397,10 +1487,10 @@ _______________________________________________________
 <a href="#p_here">HERE</a> heap.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept7: Word: ,</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: , HERE @ 8 ALLOT ! ; ( v -- ; Claim 8 bytes and put value there )</code></pre>\r
+<div class="title">Definition concept for ,</div>\r
+<div class="paragraph"><p>: , HERE @ 8 ALLOT ! ; ( v&#8201;&#8212;&#8201;; Claim 8 bytes and put value there )</p></div>\r
 </div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_colon">:</a>, <a href="#p_Ccomma">[p_Ccomma]</a>. <a href="#p_here">HERE</a>, <a href="#p_get">@</a>,\r
@@ -1422,6 +1512,7 @@ Address) of the word. The header memory layout is as follows:</p></div>
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="listingblock">\r
+<div class="title">Layout 1: rrqforth word structure</div>\r
 <div class="content">\r
 <pre><code>struct WORD\r
 TFA  8 link ; tfa of previous word\r
@@ -1448,10 +1539,10 @@ function words initiated by ":" (aka "COLON") or changed to "dovalue"
 for RRQFORTH constants created by "CONSTANT".</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 8: Word: CREATE</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>HERE @ R&gt; ( save tfa on RS )\r
+<div class="title">Definition concept for CREATE</div>\r
+<div class="paragraph"><p>HERE @ R&gt; ( save tfa on RS )\r
   R@ CURRENT-WORD @ DUP @ , ! ( link in a new word )\r
   DUP 49 + R@ + ,             ( pCFA )\r
   0 ,                         ( flags )\r
@@ -1459,13 +1550,16 @@ for RRQFORTH constants created by "CONSTANT".</p></div>
   HERE @ ROT ROT MEMCPY 0 C,  ( pname + NUL )\r
   R@ ,                        ( pTFA )\r
   0 ,                         ( OFF )\r
-  doVARIABLE                  ( CFA, default semantics )</code></pre>\r
+  doVARIABLE                  ( CFA, default semantics )</p></div>\r
 </div></div>\r
 </div></div>\r
-<div class="sidebarblock">\r
+<div class="exampleblock">\r
 <div class="content">\r
-<div class="title">Usage example: a possible definition of CONSTANT</div>\r
-<div class="paragraph"><p>: CONSTANT READ-WORD CREATE TFA&gt;DFA doVALUE OVER 8 - ! ! ;</p></div>\r
+<div class="listingblock">\r
+<div class="title">Usage example 5: a possible definition of CONSTANT</div>\r
+<div class="content">\r
+<pre><code>: CONSTANT READ-WORD CREATE TFA&gt;DFA doVALUE OVER 8 - ! ! ;</code></pre>\r
+</div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_put">!</a>, <a href="#p_plus">+</a>, <a href="#p_comma">[p_comma]</a>, <a href="#p_get">@</a>,\r
 <a href="#p_Ccomma">[p_Ccomma]</a>, <a href="#p_current_word">CURRENT-WORD</a>, <a href="#p_dup">DUP</a>,\r
@@ -1490,7 +1584,7 @@ word list word content is as follows:</p></div>
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="listingblock">\r
-<div class="title">Layout 1: word list word content</div>\r
+<div class="title">Layout 2: word list word content</div>\r
 <div class="content">\r
 <pre><code>  8 TFA of latest word in the word list\r
   8 DFA of the/a subsequent word list to search through</code></pre>\r
@@ -1525,10 +1619,10 @@ _______________________________________________________
 <div class="paragraph"><p>"DECIMAL" is a function word that sets <a href="#p_base">BASE</a> to 10.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 9: Word: DECIMAL</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: DECIMAL 10 BASE ! ;</code></pre>\r
+<div class="title">Definition concept for DECIMAL</div>\r
+<div class="paragraph"><p>: DECIMAL 10 BASE ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -1652,16 +1746,16 @@ offset to the current heap address. I.e., the word being defined will
 have its execution start at whatever comes after "DOES&gt;".</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Word: DOES&gt;</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: DOES&gt; IMMEDIATE\r
+<div class="title">Defintion concept for DOES&gt;</div>\r
+<div class="paragraph"><p>: DOES&gt; IMMEDIATE\r
 STATE @ != IF ( only for compilation mode )\r
   CURRENT-WORDLIST @ @ TFA&gt;CFA    ( cfa of current word )\r
     doDOES OVER !                 ( set up doer )\r
     HERE @ OVER 8 + - SWAP 8 - !  ( set up offset\r
   THEN\r
-;</code></pre>\r
+;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also\r
@@ -1936,14 +2030,6 @@ execution.</p></div>
 stack while reading, parsing and executing.</p></div>\r
 <div class="paragraph"><p>If "EVALUATE-STREAM" ends with 0, then <a href="#p_this_word">THIS-WORD</a> holds\r
 the [n:chars] reference of the offending word in the stream buffer.</p></div>\r
-<div class="exampleblock">\r
-<div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 10: Word: EVALUATE-STREAM</div>\r
-<div class="content">\r
-<pre><code>( too complex to include here )</code></pre>\r
-</div></div>\r
-</div></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -2082,10 +2168,10 @@ _______________________________________________________
 then decrements the cell at that address by n.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Defintion concept 11Word: @n++</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: @n++ OVER @ DUP ROT - ROT ! ;</code></pre>\r
+<div class="title">Defintion concept for @n++</div>\r
+<div class="paragraph"><p>: @n++ OVER @ DUP ROT - ROT ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2163,10 +2249,13 @@ _______________________________________________________
 </div></div>\r
 <div class="paragraph"><p>"HERE" is a variable word that keeps the lowest address of the free\r
 allocation space. It get updated by all words that allocate memory.</p></div>\r
+<div class="exampleblock">\r
+<div class="content">\r
 <div class="sidebarblock">\r
 <div class="content">\r
-<div class="title">Usage example</div>\r
-<div class="paragraph"><p>1024 HEAP @ + HEAP ! ( allocate 1024 bytes on the heap )</p></div>\r
+<div class="title">allocate 1024 bytes on the heap</div>\r
+<div class="paragraph"><p>1024 HEAP @ + HEAP !</p></div>\r
+</div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_allot">ALLOT</a>.</p></div>\r
 <div style="text-align:center">\r
@@ -2185,10 +2274,10 @@ letters a-f as additional digits. (Uppercase letter are also accepted
 on input).</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 12: Word: HEX</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: HEX 16 BASE ! ;</code></pre>\r
+<div class="title">Definition concept for HEX</div>\r
+<div class="paragraph"><p>: HEX 16 BASE ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2257,10 +2346,10 @@ _______________________________________________________
 the most recent word to 1, thereby making that word an immediate word.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 13:Word: IMMEDIATE</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: IMMEDIATE IMMEDIATE 1 CURRENT-WORDLIST @ @ 16 + ! ;</code></pre>\r
+<div class="title">Definition concept for IMMEDIATE</div>\r
+<div class="paragraph"><p>: IMMEDIATE IMMEDIATE 1 CURRENT-WORDLIST @ @ 16 + ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div class="paragraph"><p>See also <a href="#p_colon">:</a>, <a href="#p_current_wordlist">CURRENT-WORDLIST</a>,\r
@@ -2268,6 +2357,19 @@ the most recent word to 1, thereby making that word an immediate word.</p></div>
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
+<div class="paragraph"><p><a id="p_input"></a></p></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_word_input">Word: INPUT</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>"INPUT" is a variable word for the input stream buffer used by\r
+<a href="#p_evaluate_stream">EVALUATE-STREAM</a>.</p></div>\r
+<div style="text-align:center">\r
+_______________________________________________________\r
+</div>\r
 <div class="paragraph"><p><a id="p_left_bracket"></a></p></div>\r
 </div>\r
 <div class="sect2">\r
@@ -2281,10 +2383,10 @@ mode to be intepreting. In this mode, words are executed immediately
 after parsing, by invoking their "doer".</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 14: Word: [</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: [ IMMEDIATE 0 STATE ! ;</code></pre>\r
+<div class="title">Definition concept for [</div>\r
+<div class="paragraph"><p>: [ IMMEDIATE 0 STATE ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2334,10 +2436,10 @@ with the CFA pointer following the value.</p></div>
 <div class="paragraph"><p>It&#8217;s not a good idea to use "LIT" interactively.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 15: Word: LIT</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: LIT R&gt; DUP 8 + &gt;R @ ;</code></pre>\r
+<div class="title">Definition concept for LIT</div>\r
+<div class="paragraph"><p>: LIT R&gt; DUP 8 + &gt;R @ ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2356,10 +2458,10 @@ inlined subsequently to it in the containing definition. This is
 similar to <a href="#p_lit">LIT</a> but for a string literal.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 16: Word: LIT</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: LIT R&gt; DUP @ 2DUP + 8 + &gt;R SWAP 8 + SWAP ;</code></pre>\r
+<div class="title">Definition concept for LIT</div>\r
+<div class="paragraph"><p>: LIT R&gt; DUP @ 2DUP + 8 + &gt;R SWAP 8 + SWAP ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2470,10 +2572,10 @@ _______________________________________________________
 on the data stack.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 17: Word: NIP</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: NIP SWAP DROP ;</code></pre>\r
+<div class="title">Definition concept for NIP</div>\r
+<div class="paragraph"><p>: NIP SWAP DROP ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2521,14 +2623,6 @@ a 1 on top, or just a 0 if the word didn&#8217;t parse.</p></div>
 base, letters a-f or A-F for values 10-15. I.e. the normal positive or\r
 negative decimal integers or normal (positive only) hexadecimal\r
 integers.</p></div>\r
-<div class="exampleblock">\r
-<div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 18: Word: NUMBER</div>\r
-<div class="content">\r
-<pre><code>( too complex to include here )</code></pre>\r
-</div></div>\r
-</div></div>\r
 <div style="text-align:center">\r
 _______________________________________________________\r
 </div>\r
@@ -2758,10 +2852,10 @@ left on the stack.</p></div>
 wordlist; i.e., the word list may contain definitions for numbers.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 19: Word: ]</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: ] 1 STATE ! ;</code></pre>\r
+<div class="title">Definition concept for ]</div>\r
+<div class="paragraph"><p>: ] 1 STATE ! ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2823,10 +2917,10 @@ _______________________________________________________
 by means of adding an <a href="#p_exit">EXIT</a></p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 20: Word: :</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: ; IMMEDIATE ' EXIT , ;</code></pre>\r
+<div class="title">Definition concept for ;</div>\r
+<div class="paragraph"><p>: ; IMMEDIATE ' EXIT , ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -2941,7 +3035,7 @@ prefixed by a 32 byte STREAM header of the following layout:</p></div>
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="listingblock">\r
-<div class="title">Stream layout 2, for file descriptor</div>\r
+<div class="title">Layout 3: file descriptor stream</div>\r
 <div class="content">\r
 <pre><code>  8 bytes = size of buffer (excluding the 32 byte header)\r
   8 bytes source file descriptor\r
@@ -2958,7 +3052,7 @@ following layout:</p></div>
 <div class="exampleblock">\r
 <div class="content">\r
 <div class="listingblock">\r
-<div class="title">Stream layout 3, for memory block</div>\r
+<div class="title">Layout 4: memory block stream</div>\r
 <div class="content">\r
 <pre><code>  8 bytes = block address\r
   8 -1 (indicates memory block)\r
@@ -3134,10 +3228,10 @@ _______________________________________________________
 <div class="paragraph"><p>"TFA&gt;FLAGS@" is a function word that pushes word flags of the given tfa.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Defintion concept 21Word: TFA&gt;FLAGS@</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: TFA&gt;FLAGS@ 16 + @ ;</code></pre>\r
+<div class="title">Defintion concept for TFA&gt;FLAGS@</div>\r
+<div class="paragraph"><p>: TFA&gt;FLAGS@ 16 + @ ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -3156,10 +3250,10 @@ pointer to the word pname&#8217;s character sequence, which is zero
 terminated as well as preceded by a length cell.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Defintion concept for TFA&gt;NAMEZ</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: TFA&gt;NAMEZ 32 + ;</code></pre>\r
+<div class="title">Defintion concept for TFA&gt;NAMEZ</div>\r
+<div class="paragraph"><p>: TFA&gt;NAMEZ 32 + ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -3222,10 +3316,10 @@ _______________________________________________________
 cell on the data stack.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 22: Word: TUCK</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: TUCK SWAP OVER ;</code></pre>\r
+<div class="title">Definition concept for TUCK</div>\r
+<div class="paragraph"><p>: TUCK SWAP OVER ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -3272,10 +3366,10 @@ of the the first, v, is within the value range spanned by the second,
 lo, inclusive and third, hi, exclusive.</p></div>\r
 <div class="exampleblock">\r
 <div class="content">\r
-<div class="listingblock">\r
-<div class="title">Definition concept 23: Word: WITHIN</div>\r
+<div class="sidebarblock">\r
 <div class="content">\r
-<pre><code>: WITHIN 2 PICK &gt; ROT ROT &lt;= AND ;</code></pre>\r
+<div class="title">Definition concept for WITHIN</div>\r
+<div class="paragraph"><p>: WITHIN 2 PICK &gt; ROT ROT &#8656; AND ;</p></div>\r
 </div></div>\r
 </div></div>\r
 <div style="text-align:center">\r
@@ -3335,7 +3429,7 @@ is deepest.</p></div>
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2021-06-02 01:27:44 AEST\r
+ 2021-06-04 18:26:45 AEST\r
 </div>\r
 </div>\r
 </body>\r