http://t3x.org/t3xforth/glossary.html

T3XFORTH

T3XFORTH

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3:                                                                 :
 4: SOURCES                                                         :
 5: -                                                               :
 6: These indicate where a word originates from, not necessarily    :
 7: where it appeared first. Words attributed "DOUBLE" need the     :
 8: T3XFORTH DOUBLE word set to be loaded.                          :
 9:                                                                 :
10: BF      Beginning FORTH, Paul Chirlian, Matrix Pub., 1983       :
11: EFORTH  EFORTH 1.0, Bill Muench and C. H. Ting, 1990            :
12: F-79    FORTH-79 Standard, FORTH Standards Team, 1980           :
13: F-83    FORTH-83 Standard, FORTH Standards Team, 1983           :
14: FIG     FORTH Interest Group 8086 FORTH, J.E. Smith, 1982       :
15: SF      Starting FORTH, Leo Brodie, Prentice Hall, 1981         :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: VALUES IN STACK EFFECTS                                         :
 4: -                                                               :
 5: a   an address              r   a return address                :
 6: c   a byte / character      u   an unsigned number              :
 7: d   a signed double word    ud  an unsigned double word         :
 8: f   a flag (0 or 1)         w   a machine word                  :
 9: n   a signed number         A|B value A or value B              :
10:                                 ( X Y | Z means either          :
11:                                   X and Y or just Z )           :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: GLOSSARY                                                        :
 4: -                                                               :
 5:  ( -- )               About the Glossary                -       :
 6: "help"                ^-- Properties         Standard --^       :
 7: ^-- Pronunciation                                               :
 8: The first line of each glossary entry lists the name of the     :
 9: word being described (blank in this case), its stack effect     :
10: in parentheses, additional properties of the word (such as      :
11: IMMEDIATE, VARIABLE, or DEFER (q.v.)), as well as the source    :
12: from which the word was taken (e.g. F-79 for FORTH-79).         :
13: To list the glossary entry of a word, type HELP word. To        :
14: list this page, type HELP.                                      :
15: Example: HELP DUP  \ Print the glossary entry of DUP            :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ! ( w a -- )          Code                              F-79    :
 4: "store"                                                         :
 5: Store machine word W at address A.                              :
 6: Example: VARIABLE X  123 X !  \ Store 123 in X                  :
 7:                                                                 :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: # ( u -- u )                                            -       :
 4: # ( ud -- ud )                                   DOUBLE F-79    :
 5: "sharp"                                                         :
 6: Usage: between <# and #> -- Convert the least significant digit :
 7: of U (with respect to BASE) to an ASCII digit and store it at   :
 8: HLD. Decrement HLD. Return U divided by BASE. Digits >9 are     :
 9: represented by upper-case roman letters (A...). When the double :
10: word set is loaded, convert an unsigned double number UD        :
11: instead of U.                                                   :
12: Example: see <#                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: #> ( u -- a u )                                         -       :
 4: #> ( ud -- a u )                                 DOUBLE F-79    :
 5: "less-sharp"                                                    :
 6: End pictured number conversion. Remove the intermediate value U :
 7: and return a counted string. When the double word set is loaded,:
 8: remove a double-size intermediate value.                        :
 9: Example: see <#                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: #S ( u -- 0 )                                           -       :
 4: #S ( ud -- 0d )                                  DOUBLE F-79    :
 5: "sharp-s"                                                       :
 6: Usage: between <# and #> -- Convert all remaining digits of the :
 7: intermediate value U using #. When U equals 0, emit one ASCII 0.:
 8: When the double word set is loaded, convert all digits of the   :
 9: unsigned double number UD.                                      :
10: Example: see <#                                                 :
11:                                                                 :
12: #TIB ( -- a )         VARIABLE                          F-83    :
13: "number-t-i-b"                                                  :
14: The number of characters currently in the terminal input        :
15: buffer (TIB).                                                   :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: $" ( -- a )           IMMEDIATE COMPILE-ONLY            BF      :
 4: "string-quote"                                                  :
 5: Usage: $" ccc" -- Return the address of a packed string         :
 6: containing the characters ccc.                                  :
 7: Example: : FOO $" Hello" COUNT TYPE ;  \ Print Hello            :
 8:                                                                 :
 9: $+ ( a1 -- a1 a2 )                                      -       :
10: "string-plus"                                                   :
11: Return the address (A2) of the first byte after the packed      :
12: string at A1. Leave the address of the string on the stack.     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: $, ( -- )             COMPILE-ONLY                      -       :
 4: "string-comma"                                                  :
 5: Usage: $" ccc" -- Compile packed string to dictionary. Used by  :
 6: $" and ." and similar words.                                    :
 7:                                                                 :
 8: ' ( -- a )                                              F-83    :
 9: "tick"                                                          :
10: Usage: ' name -- Look up the given name in the dictionary and   :
11: return its PFA. When a word compiles ' then the word will read  :
12: a name a run time. To compile the address of a word as a        :
13: literal, use ['].                                               :
14: Example: ' QUIT  \ the PFA of QUIT                              :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: '?KEY ( -- a )        VARIABLE                          EFORTH  :
 4: "tick-question-key"                                             :
 5: The PFA of the function receiving characters from the console   :
 6: (see ?KEY).                                                     :
 7:                                                                 :
 8: 'EMIT ( -- a )        VARIABLE                          EFORTH  :
 9: "tick-emit"                                                     :
10: The PFA of the function sending characters to the console (see  :
11: EMIT).                                                          :
12:                                                                 :
13: 'NUMBER ( -- a )      VARIABLE                          -       :
14: "tick-number"                                                   :
15: The PFA of the function parsing numbers. See NUMBER.            :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ( ( -- )              IMMEDIATE                         F-79    :
 4: "paren"                                                         :
 5: Usage: ( ccc) -- A comment, all characters between the          :
 6: parentheses will be ignored.                                    :
 7: Example: ( this will be ignored )                               :
 8:                                                                 :
 9: ($") ( -- a )         COMPILE-ONLY                      -       :
10: "do-string-quote"                                               :
11: The runtime part of $" (q.v.). Skip over a packed string and    :
12: return its address.                                             :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (+LOOP) ( n -- )      Code COMPILE-ONLY                 -       :
 4: "do-plus-loop"                                                  :
 5: The runtime part of +LOOP (q.v.).                               :
 6:                                                                 :
 7: (.") ( -- a )         COMPILE-ONLY                      -       :
 8: "do-dot-quote"                                                  :
 9: The runtime part of ." (q.v.).                                  :
10:                                                                 :
11: (/LOOP) ( n -- )      Code COMPILE-ONLY                 -       :
12: "do-up-loop"                                                    :
13: The runtime part of /LOOP (q.v.).                               :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (0BRANCH) ( f -- )    Code COMPILE-ONLY                 -       :
 4: "do-zero-branch"                                                :
 5: "Branch on false." If F is 0, branch to the address stored      :
 6: in the subsequent machine word. If F is not 0, skip over the    :
 7: subsequent machine word.                                        :
 8:                                                                 :
 9: (ABORT") ( f -- )     COMPILE-ONLY                      -       :
10: "do-abort-quote"                                                :
11: Usage: ABORT" ccc" -- If F is not zero, print the characters    :
12: ccc, followed by "?" and a CR, and abort program execution      :
13: via ABORT. If F is zero, do nothing.                            :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (BRANCH) ( -- )       Code COMPILE-ONLY                 -       :
 4: "do-branch"                                                     :
 5: Jump to the address stored in the subsequent machine word.      :
 6:                                                                 :
 7: (COLON) ( -- ; -- r )  Code COMPILE-ONLY                -       :
 8: "do-colon"                                                      :
 9: The address list interpreter; the runtime part of : (q.v.).     :
10:                                                                 :
11: (CONSTANT) ( -- w )   Code COMPILE-ONLY                 -       :
12: "do-constant"                                                   :
13: The runtime part of CONSTANT (q.v.).                            :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (DEFER) ( -- )        COMPILE-ONLY                      -       :
 4: "do-defer"                                                      :
 5: The default runtime action of DEFER (q.v.).                     :
 6:                                                                 :
 7: (DO) ( n n -- )       Code COMPILE-ONLY                 -       :
 8: "do-do"                                                         :
 9: The runtime part of DO (q.v.).                                  :
10:                                                                 :
11: (DOES>) ( -- a )      Code COMPILE-ONLY                 -       :
12: "do-does"                                                       :
13: The runtime part of DOES> (q.v.).                               :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (FENCE) ( -- )                                          -       :
 4: "paren-fence"                                                   :
 5: The last word in the dictionary that is by default protected    :
 6: against removal by FORGET. See FENCE. When executed, does       :
 7: nothing.                                                        :
 8:                                                                 :
 9: (FORTH) ( -- a )      VARIABLE                          -       :
10: "paren-forth"                                                   :
11: The vocabulary pointer used by FORTH (q.v.).                    :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (LIT) ( -- w )        Code COMPILE-ONLY                 EFORTH  :
 4: "do-literal"                                                    :
 5: Push the value in the subsequent machine word to the stack and  :
 6: skip over the machine word. Used to push literal numbers.       :
 7:                                                                 :
 8: (LOOP) ( -- )         Code COMPILE-ONLY                 -       :
 9: "do-loop"                                                       :
10: The runtime part of LOOP (q.v.).                                :
11:                                                                 :
12: (PAD) ( u1 u2 -- u1 )                                   -       :
13: "paren-pad"                                                     :
14: If U2 is greater than U1, emit U2-U1 spaces. Used by .R and     :
15: U.R to pad output.                                              :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: (QUIT) ( -- )         IS QUIT                           -       :
 4: "do-quit"                                                       :
 5: The word implementing QUIT (q.v.).                              :
 6:                                                                 :
 7: (VAR) ( -- a )        Code COMPILE-ONLY                 -       :
 8: "do-variable"                                                   :
 9: The runtime part of VARIABLE (q.v.).                            :
10:                                                                 :
11: * ( w1 w2 -- w )                                        F-79    :
12: "star"                                                          :
13: Pop W1 and W2 and leave their product on the stack.             :
14: Example: 3 4 *  \ gives 12                                      :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: */ ( n1 n2 n2 -- n )                                    F-83    :
 4: "star-slash"                                                    :
 5: Pop three values and leave N1 * N2 / N3 on the stack. The       :
 6: intermediate result of N1 * N2 has double precision, so no      :
 7: overflow can occur as long as the final results has single      :
 8: precision.                                                      :
 9: Example: 10000 355 113 */  \ gives 31415                        :
10:                                                                 :
11: */MOD ( n n n -- nm nq )                                F-83    :
12: "star-slash-mod"                                                :
13: Like */, but also leaves the division remainder (modulo) on     :
14: the stack. NM is the remainder and NQ the floored quotient.     :
15: Example: 10000 355 113 */  \ gives 105 31415                    :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: + ( n n -- n )                                          F-79    :
 4: "plus"                                                          :
 5: Remove two values and leave their sum on the stack.             :
 6: Example: 3 4 +  \ gives 7                                       :
 7:                                                                 :
 8: +! ( n a -- )                                           F-79    :
 9: "plus-store"                                                    :
10: Add the value N to the value at the address A.                  :
11: Example: VARIABLE X  1 X !  2 X +!  \ X is now 3                :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: +LOOP ( n -- )        IMMEDIATE COMPILE-ONLY            F-79    :
 4: "plus-loop"                                                     :
 5: Usage: DO ... n +LOOP -- Add N to the index of the innermost DO :
 6: loop. When the updated index is lower than the loop limit, jump :
 7: back to the start of loop. Otherwise, remove the index and limit:
 8: and exit the loop.                                              :
 9: Example: : FOO 10 2 DO I . 2 +LOOP ;  \ print 2 4 6 8           :
10:                                                                 :
11: , ( n -- )                                              F-79    :
12: "comma"                                                         :
13: Compile the machine word N into the next free dictionary        :
14: location.                                                       :
15: Example: 123 ,  \ compiles 123 into the dictionary              :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: - ( n1 n2 -- n )                                        F-79    :
 4: "minus"                                                         :
 5: Remove two values and return their difference, N1-N2.           :
 6: Example: 7 5 -  \ gives 2                                       :
 7:                                                                 :
 8: -1 ( -- n )           CONSTANT                          -       :
 9: "minus-one"                                                     :
10: A constant with the value -1. Takes up less space than a        :
11: literal.                                                        :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: -ROT ( w1 w2 w3 -- w3 w1 w2 )                           -       :
 4: "dash-rote" "down-rote"                                         :
 5: Rotate the top of the stack down to the third position. This    :
 6: is the inverse operation of ROT.                                :
 7: Example: >R -ROT R> -ROT  \ swap two double words               :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: -TEXT ( a1 u a2 -- n )                                  SF      :
 4: "dash-text" "not-text"                                          :
 5: Compare two strings A1 and A2, both of length U. When they are  :
 6: equal, return 0. If they differ, return the difference between  :
 7: the first differing characters. E.g. comparing "FOX" and "FOB"  :
 8: will return 22, because "X" has the ASCII code 88, "B" has the  :
 9: ASCII code 66, and 88-66 = 22.                                  :
10: Example: : FOO $" FOX" COUNT $" FOB" -TEXT ;  \ X-B = 22        :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: -TRAILING ( a n -- a n )                                F-79    :
 4: "dash-trailing" "not-trailing"                                  :
 5: Remove trailing blank characters from the string at address A   :
 6: with length N. Return A unchanged and a new length N.           :
 7: Example: : FOO $" FOO  " COUNT -TRAILING ;  \ gives "FOO" 3     :
 8:                                                                 :
 9: . ( n -- )                                              F-79    :
10: "dot"                                                           :
11: Print N as a signed number with respect to the current BASE,    :
12: followed by one space character.                                :
13: Example: 123 .  \ print 123                                     :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ." ( -- )             IMMEDIATE COMPILE-ONLY            F-83    :
 4: "dot-quote"                                                     :
 5: Usage: ." ccc" -- Print the characters ccc. At compile time,    :
 6: compile the runtime part of the word and store the characters   :
 7: ccc in memory as a packed string. The runtime word will skip    :
 8: over the string and output its characters.                      :
 9: Example: : FOO ." Hello, World" ;  \ print greeting             :
10:                                                                 :
11: .( ( -- )             IMMEDIATE                         F-83    :
12: "dot-paren"                                                     :
13: Usage: .( ccc) -- Print the characters ccc.                     :
14: Example: .( hello )  \ print hello (and a trailing blank)       :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: .OK ( -- )                                              -       :
 4: "dot-o-k"                                                       :
 5: Print the string "OK" except when currently compiling. Then     :
 6: emit a CR (even when compiling).                                :
 7:                                                                 :
 8: .R ( n1 n2 -- )                                         FIG     :
 9: "dot-r"                                                         :
10: Print N1 as a signed number with respect to the current BASE,   :
11: right-padded in a field of N2 blank characters. If N2 is less   :
12: than the number of characters occupied by N1, do not emit any   :
13: padding spaces, but still print the complete number N1.         :
14: Example: 123 5 .R  \ print "  123"                              :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: .S ( -- )                                               EFORTH  :
 4: "dot-s"                                                         :
 5: Print the values currently on the stack, starting at the top    :
 6: of the stack and progressing towards values stored deeper on    :
 7: the stack.                                                      :
 8: Example: 1 2 3 .S  \ print 3 2 1                                :
 9:                                                                 :
10: / ( n1 n2 -- n )                                        F-83    :
11: "slash"                                                         :
12: Remove two values and return their floored quotient, N1 / N2.   :
13: Example: 36 7 /  \ gives 5                                      :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: /LOOP ( u -- )                                          SF      :
 4: "up-loop"                                                       :
 5: Usage: DO ... n /LOOP -- Like +LOOP (q.v.), but the loop index  :
 6: and limit are unsigned values.                                  :
 7: Example: 32770 32760 DO I U. 5 /LOOP ;  \ print 32765 32770     :
 8:                                                                 :
 9: /MOD ( n1 n2 -- nm nq )                                 F-83    :
10: "slash-mod"                                                     :
11: Remove two values and return their floored quotient             :
12: NQ = N1 / N2 and division remainder NM = N1 mod N2.             :
13: Example: 38 7 /MOD  \ gives 3 5                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 0 ( -- n )            CONSTANT                          FIG     :
 4: "zero"                                                          :
 5: A constant with the value 0. Takes up less space than a         :
 6: literal.                                                        :
 7:                                                                 :
 8: 0< ( n -- f )         Code                              F-79    :
 9: "zero-less"                                                     :
10: Return truth, if N is less than 0.                              :
11: Example: -1 0<  \ gives -1                                      :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 0= ( w -- f )                                           F-79    :
 4: "zero-equals"                                                   :
 5: Return truth, if N is equal to 0.                               :
 6: Example: 0 0=  \ gives -1                                       :
 7:                                                                 :
 8: 0> ( n -- f )                                           F-79    :
 9: "zero-greater"                                                  :
10: Return truth, if N is greater than 0.                           :
11: Example: 1 0>  \ gives -1                                       :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 0SAVE ( -- f )                                          -       :
 4: "zero-save"                                                     :
 5: Save buffer 0 to disk, if its UPDATE (q.v.) flag is set.        :
 6: Return 0, if the buffer could not be saved, and otherwise 1.    :
 7:                                                                 :
 8: 1 ( -- n )            CONSTANT                          FIG     :
 9: "one"                                                           :
10: A constant with the value 1. Takes up less space than a         :
11: literal.                                                        :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 1+ ( n -- n )                                           F-79    :
 4: "one-plus"                                                      :
 5: Add 1 to N.                                                     :
 6: Example: 1 1+  \ gives 2                                        :
 7:                                                                 :
 8: 1- ( n -- n )                                           F-79    :
 9: "one-minus"                                                     :
10: Subtract 1 from N.                                              :
11: Example: 3 1-  \ gives 2                                        :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 1SAVE ( -- f )                                          -       :
 4: "one-save"                                                      :
 5: Save buffer 1 to disk, if its UPDATE (q.v.) flag is set.        :
 6: Return 0, if the buffer could not be saved, and otherwise 1.    :
 7:                                                                 :
 8: 2 ( -- n )            CONSTANT                          FIG     :
 9: "two"                                                           :
10: A constant with the value 2. Takes up less space than a         :
11: literal.                                                        :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2! ( d a -- )                                           F-79    :
 4: "two-store"                                                     :
 5: Store double word D at address A.                               :
 6: Example: VARIABLE X 0 ,  0 0 X 2!  \ store 0 0 in X             :
 7:                                                                 :
 8: 2* ( n -- n )                                           SF      :
 9: "two-star"                                                      :
10: Multiply N by 2.                                                :
11: Example: 5 2*  \ gives 10                                       :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2+ ( n -- n )                                           F-79    :
 4: "two-plus"                                                      :
 5: Add 2 to N.                                                     :
 6: Example: 5 2+  \ gives 7                                        :
 7:                                                                 :
 8: 2- ( n -- n)                                            F-79    :
 9: "two-minus"                                                     :
10: Subtract 2 from N.                                              :
11: Example: 5 2-  \ gives 3                                        :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2/ ( n -- n )                                           F-83    :
 4: "two-slash"                                                     :
 5: Divide N by 2.                                                  :
 6: Example: 9 2/  \ gives 4 (floored)                              :
 7:                                                                 :
 8: 2@ ( a -- d )                                           F-79    :
 9: "two-fetch"                                                     :
10: Fetch a double word from address A and push it to the stack.    :
11: Example: VARIABLE X 0 , X 2@  \ gives 0 0                       :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2CONSTANT ( d -- )    Defining Word              DOUBLE F-79    :
 4: "two-constant"                                                  :
 5: Usage: double-value 2CONSTANT name -- Create a new word with    :
 6: the given name that, when executed, will return the given       :
 7: double-size value.                                              :
 8: Example: 1,000,000 2CONSTANT ONE-MILLION                        :
 9:                                                                 :
10: 2DROP ( d -- )                                          F-79    :
11: "two-drop"                                                      :
12: Remove a double word from the stack.                            :
13: Example: 1 2 3 2DROP  \ gives 1                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2DUP ( d -- d d )                                       F-79    :
 4: "two-dupe"                                                      :
 5: Push another copy of the double word on top of the stack.       :
 6: Example: 1 2 2DUP  \ gives 1 2 1 2                              :
 7:                                                                 :
 8: 2OVER ( d1 d2 -- d1 d2 d1 )                             F-79    :
 9: "two-over"                                                      :
10: Push another copy of the double word below the double word      :
11: on top of the stack.                                            :
12: Example: 1 2 3 4 2OVER  \ gives 1 2 3 4 1 2                     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2ROT ( d1 d2 d3 -- d2 d3 d1 )                    DOUBLE F-79    :
 4: Rotate the third double-word element on the stack to the top.   :
 5: Example: 1 1 2 2 3 3 2ROT  \ gives 2 2 3 3 1 1                  :
 6:                                                                 :
 7: 2SWAP ( d1 d2 -- d2 d1 )                                F-79    :
 8: "two-swap"                                                      :
 9: Swap the two double words on top of the stack.                  :
10: Example: 1 2 3 4 2SWAP  \ gives 3 4 1 2                         :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: 2VARIABLE ( -- )      Defining Word              DOUBLE F-79    :
 4: "two-variable"                                                  :
 5: Usage: 2VARIABLE name -- Create a new variable and allocate     :
 6: 2 cells for its value. May be used to store double words or     :
 7: two words.                                                      :
 8: Example:                                                        :
 9: 2VARIABLE X/Y  10 20 X/Y 2!                                     :
10: \ create variable X/Y and store 10 and 20 in it                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: : ( -- )              Defining Word                     F-79    :
 4: "colon"                                                         :
 5: Usage: : NAME words ; -- Add the given name to the dictionary,  :
 6: store the address of (COLON) in its code field, and compile     :
 7: words and numeric literals until the word ; (q.v.) is found.    :
 8: The resulting dictionary entry will execute the given words     :
 9: when itself executed.                                           :
10: Example: : SQUARE ( n -- n ) DUP * ;  \ x-squared function      :
11:                                                                 :
12: ; ( -- )              IMMEDIATE COMPILE-ONLY            F-79    :
13: "semicolon"                                                     :
14: Compile EXIT (q.v.) and stop the compiler (see :).              :
15: Example: see :                                                  :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: < ( n1 n2 -- f )                                        F-79    :
 4: "less-than"                                                     :
 5: Return truth, if N1 is less than N2.                            :
 6: Example: 5 7 <  \ gives -1                                      :
 7:                                                                 :
 8: <# ( ud -- u )                                          -       :
 9: <# ( ud -- ud )                                  DOUBLE F-79    :
10: "less-sharp"                                                    :
11: Begin pictured number conversion. When the double word set is   :
12: not loaded, remove the high word of the unsigned double UD.     :
13: Example:                                                        :
14: : FOO DUP ABS 0 <# # # [CHAR] . HOLD #S SIGN #> TYPE ;          :
15: \ print number as #.## with optional minus sign                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: <> ( w1 w2 -- f )                                       -       :
 4: "not-equal"                                                     :
 5: Return truth, if W1 is not equal to W2.                         :
 6: Example: 1 2 <>  \ gives -1                                     :
 7:                                                                 :
 8: <BUILDS ( -- )        Defining Word                     FIG     :
 9: "builds"                                                        :
10: Usage: : name p1 <BUILDS p2 DOES> p3 ; -- Create a new          :
11: dictionary entry and set it up for use with DOES>. The words    :
12: in P2 will set up the parameter field of the new word and P3    :
13: is the runtime part of the new word.                            :
14: Example: see DOES>                                              :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: <CMOVE ( a1 a2 n -- )                                   SF      :
 4: "reverse-c-move"                                                :
 5: Copy N bytes from A1 to A2. Start copying at the end of the     :
 6: block, so the byte at A1+N-1 will be copied to A2+N-1 first.    :
 7: Used to copy a block to an overlapping block at a higher        :
 8: address. When N<1, do nothing.                                  :
 9: Example: see CMOVE                                              :
10:                                                                 :
11: = ( w1 w2 -- f )                                        F-79    :
12: "equals"                                                        :
13: Return truth, if W1 equals W2.                                  :
14: Example: 5 5 =  \ gives -1                                      :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: > ( n1 n2 -- f )                                        F-79    :
 4: "greater"                                                       :
 5: Return truth, if N1 is greater than N2.                         :
 6: Example: 7 5 >  \ gives -1                                      :
 7:                                                                 :
 8: >CFA ( a -- a )                                         -       :
 9: "to-c-f-a"                                                      :
10: Given a name field address (NFA), return the corresponding      :
11: code field address (CFA).                                       :
12: Example: LAST @ >CFA  \ CFA of most recent definition           :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: >CHAR ( n -- c )                                        EFORTH  :
 4: "to-char"                                                       :
 5: Convert a number to the ASCII code of a printable character.    :
 6: First set all but the least significant seven bits to zero.     :
 7: If the result is not in the range 32..126, replace it with      :
 8: code 95 (the underscore character _).                           :
 9: Example: 7 >CHAR  \ gives _ character                           :
10:                                                                 :
11: >IN ( -- a )          VARIABLE                          F-79    :
12: "to-in"                                                         :
13: The offset of the next character to be read from the current    :
14: input buffer.                                                   :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: >LFA ( a -- a )                                         -       :
 4: "to-l-f-a"                                                      :
 5: Given a name field address (NFA), return the corresponding      :
 6: link field address (LFA).                                       :
 7: Example: LAST @ >LFA  \ LFA of most recent definition           :
 8:                                                                 :
 9: >NFA ( a -- a )                                         -       :
10: "to-n-f-a"                                                      :
11: Given a parameter field address (PFA), return the corresponding :
12: name field address (NFA).                                       :
13: Example: ' QUIT >NFA  \ NFA of QUIT                             :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: >PFA ( a -- a )                                         -       :
 4: "to-p-f-a"                                                      :
 5: Given a name field address (NFA), return the corresponding      :
 6: parameter field address (LFA).                                  :
 7: Example: LAST @ >PFA  \ PFA of most recent definition           :
 8:                                                                 :
 9: ?0>DUP ( n -- n n | F )                                 -       :
10: "question-zero-greater-dupe"                                    :
11: If N is greater than zero, push another copy of it, else        :
12: replace it with false. Used to test for positive arguments.     :
13: Example: -1 ?0>DUP  \ gives 0                                   :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: >R ( w -- ; -- w )    Code                              F-79    :
 4: "to-r"                                                          :
 5: Move one machine word from the parameter stack to the return    :
 6: stack.                                                          :
 7: Example: see -ROT                                               :
 8:                                                                 :
 9: ? ( a -- )                                              F-79    :
10: "question"                                                      :
11: Print the value at A using . (dot).                             :
12: Example: VARIABLE X  123 X !  X ?  \ print 123                  :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?COMPILE-ONLY ( a -- a )                                -       :
 4: "question-compile-only"                                         :
 5: Abort with an error message, if the word whose PFA is A is      :
 6: marked COMPILE-ONLY. Otherwise return A.                        :
 7: Example: ' IF ?COMPILE-ONLY  \ aborts                           :
 8:                                                                 :
 9: ?DIGIT ( c -- u T | F )                                 -       :
10: "question-digit"                                                :
11: When C is the ASCII code of a digit with respect to the         :
12: current BASE, return the value of the digit and truth.          :
13: Otherwise return false. Upper-case characters are recognized    :
14: as digits with values greater than 9.                           :
15: Example: [CHAR] 9 ?DIGIT  \ gives 9 1 (if BASE is decimal)      :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?DUP ( w -- w w | w )                                   F-79    :
 4: "question-dupe"                                                 :
 5: If W is not zero, push another copy of it.                      :
 6: Example: 1 ?DUP  \ gives 1 1                                    :
 7:                                                                 :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?ENOUGH ( -- )        COMPILE-ONLY                      -       :
 4: "question-enough"                                               :
 5: Write a : character and wait for a character to be received     :
 6: from the current input device and then erase the : character    :
 7: using BACKSPACE. If the received character is "q", make the     :
 8: calling word exit. Otherwise do nothing. Used for emitting      :
 9: output in limited chunks.                                       :
10: Example:                                                        :
11: : FOO ?ENOUGH 1 ;  \ when pressing "q", 1 is never pushed       :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?EXIT-CACHED ( u -- a | u ; | r )                       -       :
 4: "question-exit-cached"                                          :
 5: If the block U is in any of the two block buffers, return the   :
 6: address of the buffer and exit the calling word via EXIT. When  :
 7: the block U is not in any buffer, return the requested block    :
 8: number (in this case the caller will not exit).                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?FIND ( a -- a f )                                      -       :
 4: "question-find"                                                 :
 5: Attempt to find a dictionary entry whose name matches the       :
 6: packed string A. First look up the name in the CONTEXT          :
 7: dictionary. When the CONTEXT dictionary is not FORTH, also      :
 8: look it up in the FORTH dictionary. When a matching entry       :
 9: is found, return its PFA and 1, otherwise return A and 0.       :
10: Example: : FOO $" DUP" ?FIND ;  \ gives the PFA of DUP          :
11:                                                                 :
12: ?I/O ( f -- )                                           -       :
13: "question-i-slash-o"                                            :
14: If F is false, report an input/output (I/O) error, empty the    :
15: buffers, and call ABORT. Otherwise do nothing.                  :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?IMMEDIATE ( a -- a f )                                 -       :
 4: "question-immediate"                                            :
 5: Return a non-zero value if the word whose PFA is A is an        :
 6: immediate word. Leave A on the stack.                           :
 7: Example: : FOO ['] IF ?IMMEDIATE ;  \ gives 128                 :
 8:                                                                 :
 9: ?KEY ( -- c T | F )                                     EFORTH  :
10: "question-key"                                                  :
11: Check if a character is available from the current input        :
12: device. When a character is available, return the character     :
13: and truth, otherwise return false.                              :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?MORE ( -- f )                                          -       :
 4: "question-more"                                                 :
 5: Return truth, if further characters are available in the        :
 6: current input buffer.                                           :
 7:                                                                 :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?NUMBER ( a -- n T | F )                                -       :
 4: ?NUMBER ( a -- d T | F )                         DOUBLE -       :
 5: "question-number"                                               :
 6: Attempt to convert the string at A+1 to a signed number.        :
 7: Return its value and T if the conversion succeeds, otherwise    :
 8: return false. The first character of the string may be a minus  :
 9: sign, which negates the value of the resulting number. The      :
10: digits of the number are converted by CONVERT with respect to   :
11: the current BASE. The first character after the digits in the   :
12: string must be a blank character.                               :
13: When the double word set is loaded, ?NUMBER will return a       :
14: double-size number D in case of success.                        :
15: Example: : FOO $" 123 " ?NUMBER ;  \ gives 123 1                :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?SAME ( a1 a2 -- f )  Code                              -       :
 4: "question-same"                                                 :
 5: Return truth when the packed string at A1 matches the           :
 6: dictionary entry at A2. Note: the dictionary entry will be      :
 7: in a special format, so swapping the arguments of ?SAME will    :
 8: cause an undefined result. Characters of A1 must be in upper    :
 9: case.                                                           :
10: : FOO $" DUP" ['] DUP >NFA ?SAME ;  \ gives -1                  :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ?STACK ( -- )                                           FIG     :
 4: "question-stack"                                                :
 5: When the stack pointer points to a memory location outside of   :
 6: that reserved for the stack, report an error and abort program  :
 7: execution.                                                      :
 8: Example: DROP  \ will abort on an empty stack                   :
 9:                                                                 :
10: ?WHAT ( a -- )                                          -       :
11: "question-what"                                                 :
12: Write the packed string at A, followed by a question mark, and  :
13: call ABORT. Used to report errors.                              :
14: : FOO $" HUH" ?WHAT ;  \ will abort with "HUH?"                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: @ ( a -- w )          Code                              F-79    :
 4: "fetch"                                                         :
 5: Fetch the machine word at A and return it.                      :
 6: Example: VARIABLE X  X @  \ gives 0                             :
 7:                                                                 :
 8: @EXECUTE ( a -- )                                       EFORTH  :
 9: "fetch-execute"                                                 :
10: Fetch the machine word at A and, if it not zero, EXECUTE it.    :
11: Example: VARIABLE X  X @EXECUTE  \ do nothing                   :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ABORT ( -- )                                            F-79    :
 4: "abort"                                                         :
 5: Abort program execution. Clear the stack and the return stack   :
 6: and pass control to the interpreter.                            :
 7:                                                                 :
 8: ABORT" ( f -- )       IMMEDIATE COMPILE-ONLY            F-83    :
 9: "abort-quote"                                                   :
10: Usage: ABORT" ccc" -- If F is true, write the characters ccc,   :
11: followed by a question mark and then abort program execution    :
12: via ABORT (q.v.). When F is false, do nothing.                  :
13: Example: : OOPS 1 ABORT" BOOM" ;  \ always aborts               :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ABS ( n -- u )                                          F-79    :
 4: "absolute"                                                      :
 5: Return the absolute value (distance from zero) of N.            :
 6: Example: -5 ABS  \ gives 5                                      :
 7:                                                                 :
 8: ACTIVE ( -- a )       VARIABLE                          -       :
 9: The most recently accessed buffer, 0 or 1. Only this buffer     :
10: contains valid data. When no buffer is active, ACTIVE is -1.    :
11:                                                                 :
12: ACTIVATE ( u -- )                                       -       :
13: Mark the buffer containing disk block number U active.          :
14: Note: A buffer containing block U must exist.                   :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: AGAIN ( -- )          IMMEDIATE COMPILE-ONLY            FIG     :
 4: "again"                                                         :
 5: Usage: BEGIN ... AGAIN -- Jump back to the corresponding        :
 6: occurrence of BEGIN. Words between BEGIN and AGAIN will execute :
 7: indefinitely unless the word containing them exits (see EXIT).  :
 8: Example:                                                        :
 9: : FOO BEGIN [CHAR] X EMIT AGAIN ;                               :
10: \ emit an infinite number of X characters                       :
11:                                                                 :
12: ALLOT ( n -- )                                          F-79    :
13: "allot"                                                         :
14: Allocate N bytes in the dictionary.                             :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: AND ( w1 w2 -- w )    Code                              F-79    :
 4: "and"                                                           :
 5: Return the bitwise logical AND of W1 and W2.                    :
 6: Example: 16 7 AND  \ gives 7                                    :
 7:                                                                 :
 8: ARRAY ( u -- )        Defining Word                     -       :
 9: "array"                                                         :
10: Usage: size ARRAY name -- Create an array of the given size     :
11: and name. The array size is given in cells. Subsequently        :
12: executing N NAME will return the address of the n'th element    :
13: of the array NAME.                                              :
14: Example: 10 ARRAY FOO  9 FOO  \ address of last element of FOO  :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: B/BUF ( -- u )        CONSTANT                          FIG     :
 4: "bytes-per-buffer"                                              :
 5: The number of bytes in a buffer or disk block.                  :
 6:                                                                 :
 7: B/LINE ( -- u )       CONSTANT                          -       :
 8: "bytes-per-line"                                                :
 9: The number of bytes per line in a FORTH screen.                 :
10:                                                                 :
11: B0ADDR ( -- a )       CONSTANT                          -       :
12: "b-0-address"                                                   :
13: The address of the first disk buffer.                           :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: B0BUF ( -- a )        VARIABLE                          -       :
 4: "b-0-buffer"                                                    :
 5: The number of the block stored in the first disk buffer (or -1, :
 6: if no block is stored in the buffer).                           :
 7:                                                                 :
 8: B0UPD ( -- a )        VARIABLE                          -       :
 9: "b-0-updated"                                                   :
10: The update flag of the first disk buffer (see UPDATE).          :
11:                                                                 :
12: B1ADDR ( -- a )       CONSTANT                          -       :
13: "b-1-address"                                                   :
14: The address of the second disk buffer.                          :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: B1BUF ( -- a )        VARIABLE                          -       :
 4: "b-1-buffer"                                                    :
 5: The number of the block stored in the second disk buffer (or -1,:
 6: if no block is stored in the buffer).                           :
 7:                                                                 :
 8: B1UPD ( -- a )        VARIABLE                          -       :
 9: "b-1-updated"                                                   :
10: The update flag of the second disk buffer (see UPDATE).         :
11:                                                                 :
12: BACKSPACE ( -- )                                        -       :
13: "backspace"                                                     :
14: Emit a destructive backspace sequence: blank, backspace, and    :
15: another blank.                                                  :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: BASE ( -- a )         VARIABLE                          F-79    :
 4: "base"                                                          :
 5: The current base for numeric conversion. Valid bases range from :
 6: 2 to 36. Digits with values greater than 9 are represented by   :
 7: upper-case roman letters (A...).                                :
 8:                                                                 :
 9: BEGIN ( -- )          IMMEDIATE COMPILE-ONLY            F-79    :
10: "begin"                                                         :
11: Usage: BEGIN ... condition WHILE body ... REPEAT                :
12: Usage: BEGIN body ... condition UNTIL                           :
13: Usage: BEGIN body ... AGAIN                                     :
14: Begin an unbounded loop (see WHILE and UNTIL) or an infinite    :
15: loop (see AGAIN).                                               :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: BELL ( -- )                                             -       :
 4: "bell"                                                          :
 5: Sound the console bell by sending a BEL character.              :
 6:                                                                 :
 7: BINARY ( -- )                                           -       :
 8: "binary"                                                        :
 9: Set BASE to 2 (binary).                                         :
10:                                                                 :
11: BL ( -- n )           CONSTANT                          FIG     :
12: "b-l"                                                           :
13: The ASCII code of the blank (white space) character.            :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: BLANK ( a n -- )                                        SF      :
 4: "blank"                                                         :
 5: Fill N bytes starting at A with blank characters. When N<0,     :
 6: do nothing.                                                     :
 7: Example: PAD 100 BLANK  \ fill PAD with 100 blanks              :
 8:                                                                 :
 9: BLK ( -- a )          VARIABLE                          F-79    :
10: "b-l-k"                                                         :
11: The block number of the block that currently serves as an       :
12: input buffer. When the value of BLK is 0, input is read from    :
13: the terminal input buffer (TIB).                                :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: BLOCK ( u -- a )                                        F-83    :
 4: "block"                                                         :
 5: Locate a buffer containing disk block U and return the address  :
 6: of that buffer. When no buffer contains the desired disk block, :
 7: allocate a new buffer and load the disk block into it. When no  :
 8: buffer is unallocated, allocate the least-recently used one.    :
 9: When that buffer is flagged "updated" (see UPDATE), write the   :
10: buffer before allocating it (see SAVE-BUFFERS). When a buffer   :
11: cannot be written by SAVE-BUFFERS or read by BLOCK, an error    :
12: is reported. In case of success BLOCK always returns the address:
13: of a buffer containing the desired disk block.                  :
14: Example: 1 BLOCK  \ load first disk block                       :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: BUFFER ( u -- a )                                       F-83    :
 4: "buffer"                                                        :
 5: BUFFER is like BLOCK, but does not actually load the disk block :
 6: number U. It merely allocates a buffer for it and leaves the    :
 7: content of the buffer undefined.                                :
 8: Example: 999 BUFFER  \ allocate block 999                       :
 9:                                                                 :
10: BYE ( -- )            Code                              FIG     :
11: "bye"                                                           :
12: Shut down the FORTH system.                                     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: C! ( c a -- )         Code                              F-79    :
 4: "c-store"                                                       :
 5: Store the byte/character C at address A.                        :
 6: Example:                                                        :
 7: : FOO $" FOO" DUP 1+ [CHAR] G SWAP C! ;                         :
 8: \ change "FOO" to "GOO"                                         :
 9:                                                                 :
10: C, ( c -- )                                             FIG     :
11: "c-comma"                                                       :
12: Compile the byte/character C into the next free dictionary      :
13: location.                                                       :
14: Example: [CHAR] x C,  \ compile ASCII code of "x"               :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: C@ ( a -- c )         Code                              F-79    :
 4: "c-fetch"                                                       :
 5: Fetch and return the byte/character at address A.               :
 6: Example: : FOO $" FOO" 1+ C@ ;  \ gives character "f"           :
 7:                                                                 :
 8: CELL ( -- n )         CONSTANT                          -       :
 9: "cell"                                                          :
10: The size of a cell in bytes.                                    :
11:                                                                 :
12: CELL+ ( n -- n )                                        EFORTH  :
13: "cell-plus"                                                     :
14: Add the size of a cell to N.                                    :
15: Example: VARIABLE X  ' X CELL+  \ move to cell after X          :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CELL- ( n -- n )                                        EFORTH  :
 4: "cell-minus"                                                    :
 5: Subtract the size of a cell from N.                             :
 6:                                                                 :
 7: CELLS ( n -- n )                                        EFORTH  :
 8: "cells"                                                         :
 9: Multiply N by the size of a cell.                               :
10: Example: 10 CELLS ALLOT  \ allocate 10 cells                    :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CFA>PFA ( a -- a )                                      -       :
 4: "c-f-a-to-p-f-a"                                                :
 5: Given the code field address (PFA) of a word, move to its       :
 6: parameter field address (PFA).                                  :
 7: Example: ' QUIT PFA>CFA  \ CFA of QUIT                          :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CMOVE ( a a n -- )                                      F-79    :
 4: "c-move"                                                        :
 5: Copy N bytes from A1 to A2. Start copying at the beginning of   :
 6: the block, so the byte at A1+N-1 will be copied to A2+N-1 first.:
 7: Used to copy a block to an overlapping block at a lower address.:
 8: When N<1, do nothing.                                           :
 9: Example:                                                        :
10: : FOO $" FOO" COUNT PAD SWAP <CMOVE ;  \ copy "FOO" to PAD      :
11:                                                                 :
12: COLD ( -- )           Code                              FIG     :
13: "cold"                                                          :
14: Cold-boot the FORTH system. Re-initialize the I/O devices and   :
15: then execute RESET (q.v.).                                      :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: COMPILE ( -- )        COMPILE-ONLY                      F-79    :
 4: "compile"                                                       :
 5: Usage: COMPILE word -- Compile the PFA of the subsequent word   :
 6: to the dictionary and skip over (do not execute) that word.     :
 7: Example: : FOO COMPILE BAR ;  \ compile BAR when FOO executes   :
 8:                                                                 :
 9: COMPILE-ONLY  ( -- )                                    -       :
10: "compile-only"                                                  :
11: Mark the most recently created word "compile-only". When a      :
12: word marked "compile-only" is found by the interpreter (see     :
13: INTERPRET), will complain instead of executing it.              :
14: Example: : FOO ; COMPILE-ONLY  \ FOO is now compile-only        :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CONSOLE ( -- )                                          EFORTH  :
 4: "console"                                                       :
 5: Direct interactive input output to the console device by        :
 6: setting '?KEY and 'EMIT (q.v.).                                 :
 7:                                                                 :
 8: CONSTANT ( w -- )     Defining Word                     F-79    :
 9: "constant"                                                      :
10: Usage: value CONSTANT name -- Create a new word with the given  :
11: name that, when executed, will return the given value.          :
12: Example: 1024 CONSTANT BLOCKSIZE                                :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CONTEXT ( -- a )      VARIABLE                          F-79    :
 4: "context"                                                       :
 5: The context dictionary, i.e. the vocabulary that will be        :
 6: searched for definitions by the interpreter and the compiler.   :
 7: The value stored in CONTEXT is the PFA of a VOCABULARY (q.v.).  :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CONVERT ( u a -- u a )                                  F-79    :
 4: CONVERT ( ud a -- ud a )                         DOUBLE F-79    :
 5: "convert"                                                       :
 6: Convert any digits (with respect to BASE) found at A+1 to       :
 7: values. For each digit found, multiply U by BASE and add the    :
 8: value of the digit to it. Stop when a non-digit character is    :
 9: found. Return the new value of U and the address of the         :
10: non-digit character. When the double word set is loaded, add    :
11: values to the double-size number UD and set DBL to 1 when a     :
12: comma is found among the digit characters. The comma will then  :
13: be ignored and conversion continues.                            :
14: Example: : FOO 12 $" 34xxx" CONVERT DROP ;  \ gives 1234        :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: COPY ( usrc udest -- )                                  SF      :
 4: "copy"                                                          :
 5: Load disk block USRC (source) via BLOCK and then change its     :
 6: block number to UDEST (destination). Subsequently updating      :
 7: and flushing the block will copy the content of disk block      :
 8: USRC to disk block UDEST. (See also: UPDATE, SAVE-BUFFERS.)     :
 9: Example: 100 101 COPY UPDATE FLUSH  \ copy block 100 to 101     :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: COUNT ( a1 -- a2 n )                                    F-79    :
 4: "count"                                                         :
 5: Unpack a packed string at A1 by extracting its count and        :
 6: advancing to its characters. The returned value A2 is the       :
 7: address of the characters of A1 and N is its length.            :
 8: Example: : FOO $" FOO" COUNT ;  \ gives "FOO" 3                 :
 9:                                                                 :
10: CR ( -- )                                               F-79    :
11: "c-r" "carriage return"                                         :
12: Print a newline sequence (CR, LF).                              :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CREATE ( -- )         Defining Word                     F-79    :
 4: "create"                                                        :
 5: Usage: CREATE name -- Create a new dictionary entry, but do not :
 6: link it into the dictionary. Store the name field address (NFA) :
 7: of the new entry in the variable LAST. Once linked, the new word:
 8: will return its PFA when executed. The parameter field of the   :
 9: new word has a length of 0.                                     :
10: Example: CREATE FOO  \ create entry named FOO                   :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: CURRENT ( -- a )      VARIABLE                          F-79    :
 4: "current"                                                       :
 5: The current dictionary, i.e. the vocabulary to which new        :
 6: definitions will be added. The value stored in CURRENT is       :
 7: the PFA of a VOCABULARY (q.v.).                                 :
 8:                                                                 :
 9: CURSOR ( ux uy -- )   Code, BIOS version only           -       :
10: "cursor"                                                        :
11: Move cursor to row y, column x.                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: D+ ( d d -- d )                                         F-79    :
 4: "d-plus"                                                        :
 5: Remove two double words from the stack and leave their sum      :
 6: (also as a double word).                                        :
 7: Example: [HEX] FFFF 0 1 0 D+  \ gives 0 1                       :
 8:                                                                 :
 9: D- ( d d -- d )                                  DOUBLE F-79    :
10: "d-minus"                                                       :
11: Remove two double words from the stack and leave their          :
12: difference (also as a double word).                             :
13: Example: 0 1 1 0 D-  \ gives (in hex): FFFF 0                   :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: D. ( d -- )                                      DOUBLE F-79    :
 4: "d-dot"                                                         :
 5: Print D as a signed number with respect to the current BASE,    :
 6: followed by one space character.                                :
 7: Example: 123,456 D.  \ print 123456                             :
 8:                                                                 :
 9: D.R ( d n -- )                                   DOUBLE F-79    :
10: "d-dot-r"                                                       :
11: Print D as a signed number with respect to the current BASE,    :
12: right-padded in a field of N blank characters. If N is less     :
13: than the number of characters occupied by D, do not emit any    :
14: padding spaces, but still print the complete number D.          :
15: Example: 123,456 8 D.R  \ print "  123456"                      :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: D0< ( d -- f )                                   DOUBLE -       :
 4: "d-zero-equals"                                                 :
 5: Return truth, if the double word on top of the stack is less    :
 6: than 0.                                                         :
 7: Example: -1, D0<  \ gives -1                                    :
 8:                                                                 :
 9: D0= ( d -- f )                                   DOUBLE F-79    :
10: "d-zero-equals"                                                 :
11: Return truth, if the double word on top of the stack is equal   :
12: to 0.                                                           :
13: Example: 0 0 D0=  \ gives -1                                    :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: D< ( d1 d2 -- f )                                       F-79    :
 4: "d-less-than"                                                   :
 5: Return truth, if the double word D1 is less than D2.            :
 6: Example: 123 0 456 0 D<  \ gives -1                             :
 7:                                                                 :
 8: D= ( d d -- d )                                  DOUBLE F-79    :
 9: "d-equals"                                                      :
10: Return truth, if the double word D1 is equal to D2.             :
11: Example: 123 0 123 0 D=  \ gives -1                             :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: D> ( d1 d2 -- f )                                DOUBLE -       :
 4: "d-greater-than"                                                :
 5: Return truth, if the double word D1 is less than D2.            :
 6: Example: 7, 5, D>  \ gives -1                                   :
 7:                                                                 :
 8: DABS ( d -- ud )                                 DOUBLE F-79    :
 9: "d-abs"                                                         :
10: Return the absolute value (distance from zero) of D.            :
11: Example: -100,000 DABS  \ gives 100000                          :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DBL ( -- a )          VARIABLE                          -       :
 4: "d-b-l"                                                         :
 5: True, if the most recent invocation of ?NUMBER or NUMBER        :
 6: produced a double-length result.                                :
 7:                                                                 :
 8: DECIMAL ( -- )                                          F-79    :
 9: "decimal"                                                       :
10: Set BASE to 10 (decimal). Note that you cannot set the base to  :
11: 10 by typing 10 BASE ! while the base is not ten, because all   :
12: bases are 10 (with respect to their base). Proof:               :
13: HEX BASE ?  BASE @ DECIMAL .                                    :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DEFER ( -- )          Defining Word                     -       :
 4: "defer"                                                         :
 5: Usage: DEFER name ... definition IS name -- Create a word whose :
 6: definition (usually a colon definition) will follow later. Used :
 7: to create mutually recursive definitions. When a deferred word  :
 8: that has not been resolved by IS is executed, it will report an :
 9: error.                                                          :
10: Example: DEFER FOO  : BAR ; IS FOO  \ FOO now calls BAR         :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DEFINITIONS ( -- )                                      F-83    :
 4: "definitions"                                                   :
 5: Set the CURRENT (q.v.) dictionary to the CONTEXT (q.v.)         :
 6: dictionary. I.e., all subsequent definitions will be added      :
 7: to the CONTEXT dictionary.                                      :
 8: Example: FORTH DEFINITIONS  \ add definitions to FORTH          :
 9:                                                                 :
10: DEPTH ( -- u )                                          F-79    :
11: "depth"                                                         :
12: Return the depth of the stack before pushing U.                 :
13: Example: 1 2 3 DEPTH  \ gives 3                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DIGIT ( u -- c )                                        FIG     :
 4: "digit"                                                         :
 5: Convert the value U to an ASCII digit. Digits with values >9    :
 6: will be represented by upper-case roman letters (A...). The     :
 7: value of BASE does not have any influence on DIGIT.             :
 8: Example: 15 DIGIT  \ gives the character "F"                    :
 9:                                                                 :
10: DLITERAL ( d -- )     IMMEDIATE COMPILE-ONLY            FIG     :
11: "d-literal"                                                     :
12: Compile the double-length D as a literal (two literals in fact).:
13: For usage see LITERAL.                                          :
14: Example: : foo [ 0 1 ] DLITERAL ;  \ will return 65536          :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DMAX ( d d -- d )                                DOUBLE F-79    :
 4: "d-max"                                                         :
 5: Return the greater one of two double numbers on the stack.      :
 6: Example: 5, 7, DMAX  \ gives 7,                                 :
 7:                                                                 :
 8: DMIN ( d d -- d )                                DOUBLE F-79    :
 9: "d-min"                                                         :
10: Return the smaller one of two double numbers on the stack.      :
11: Example: 5, 7, DMIN  \ gives 5,                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DNEGATE ( d -- d )                                      F-79    :
 4: "d-negate"                                                      :
 5: Invert the sign of the double word D.                           :
 6: Example: 1 0 DNEGATE  \ gives -1 -1                             :
 7:                                                                 :
 8: DO ( n1 n2 -- ; -- n2 n1 )  IMMEDIATE COMPILE-ONLY      F-79    :
 9: "do"                                                            :
10: Usage: DO ... LOOP                                              :
11: Usage: DO ... +LOOP                                             :
12: Usage: DO ... /LOOP                                             :
13: Initiate a DO loop by moving the initial loop index N2 and      :
14: the loop limit N1 to the return stack. See LOOP, +LOOP, and     :
15: /LOOP for further details.                                      :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DOES> ( -- )          COMPILE-ONLY                      F-79    :
 4: "does"                                                          :
 5: Usage: : name p1 <BUILDS p2 DOES> p3 ; -- Modify all words      :
 6: created by NAME in such a way that they will execute P3 at      :
 7: run time. The code following DOES> will find the PFA of the     :
 8: executing word on top of the stack.                             :
 9: Example:                                                        :
10: : KONSTANT ( w -- ) <BUILDS , DOES> @ ;  \ implement CONSTANT   :
11:                                                                 :
12: DRIVE ( u -- )        Code, BIOS version only           -       :
13: "drive"                                                         :
14: Select disk drive 0 or 1.                                       :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DROP ( w -- )         Code                              F-79    :
 4: "drop"                                                          :
 5: Remove the machine word at the top of the stack.                :
 6: Example: 1 2 3 DROP  \ gives 1 2                                :
 7:                                                                 :
 8: DU* ( ud1 ud2 -- u2 )                            DOUBLE -       :
 9: "d-u-star"                                                      :
10: Return the double-size product of the unsigned double-size      :
11: numbers UD1 and UD2.                                            :
12: Example: 100,000 5, DU*  \ gives 500,000                        :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DU< ( ud1 ud2 -- f )                             DOUBLE F-79    :
 4: "d-u-less"                                                      :
 5: Return truth, if the unsigned double word UD1 is less than UD2. :
 6: Example: HEX FFFE FFFF FFFF FFFF DU<  \ gives -1                :
 7:                                                                 :
 8: DUMP ( a -- a )                                         SF      :
 9: "dump"                                                          :
10: Print a hex and character dump of the bytes at A1 through A1+15.:
11: Unprintable characters in the character dump are replaced with  :
12: an underscore (_). Return A1+16, so that a subsequent DUMP will :
13: print the next 16 bytes.                                        :
14: Example: TIB DUMP \ dump the beginning of the TIB               :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: DUP ( w -- w w )      Code                              F-79    :
 4: "dupe"                                                          :
 5: Push another copy of the machine word W.                        :
 6: Example: 1 DUP  \ gives 1 1                                     :
 7:                                                                 :
 8: ELSE ( -- )           IMMEDIATE COMPILE-ONLY            F-79    :
 9: "else"                                                          :
10: Usage: condition IF ... ELSE ... THEN -- Jump to a matching     :
11: occurrence of THEN, skipping all words between ELSE and THEN.   :
12: See IF for details.                                             :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: EMIT ( c -- )                                           F-79    :
 4: "emit"                                                          :
 5: Print the character with the ASCII code C.                      :
 6: Example: 42 EMIT  \ emit a *                                    :
 7:                                                                 :
 8: EMPTY ( -- )                                            SF      :
 9: "empty"                                                         :
10: Remove all user definitions from the dictionary and set both    :
11: the CONTEXT and CURRENT dictionary to FORTH (q.v.).             :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: EMPTY-BUFFERS ( -- )                                    F-79    :
 4: "empty-buffers"                                                 :
 5: Mark all buffers of the system unused and clear their update    :
 6: flags. When a buffer was changed but not yet written to the     :
 7: corresponding disk block, the changes will be lost.             :
 8:                                                                 :
 9: ENTRY ( a -- )                                          -       :
10: "entry"                                                         :
11: Convert the packed string at A to dictionary entry format.      :
12: Used by definition words to compile dictionary entries. The     :
13: string will be changed in place.                                :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ERASE ( a n -- )                                        FIG     :
 4: "erase"                                                         :
 5: Fill N bytes starting at A with null bytes (NUL characters).    :
 6: When N<0, do nothing.                                           :
 7: Example: PAD 100 ERASE  \ erase 100 characters at PAD           :
 8:                                                                 :
 9: EXECUTE ( a -- )      Code                              F-79    :
10: "execute"                                                       :
11: Execute the word stored at address A. The address must be a     :
12: parameter field address (PFA).                                  :
13: Example: 1 2 ' DUP EXECUTE  \ gives 1 2 2                       :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: EXIT ( -- ; r -- )    Code                              F-79    :
 4: "exit"                                                          :
 5: Exit from the currently executing colon word, returning         :
 6: control to its caller. The address to return to is taken        :
 7: (and removed) from the return stack.                            :
 8: Example: : FOO EXIT BAR ;  \ BAR is never called                :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: EXPECT ( a u -- )                                       F-79    :
 4: "expect"                                                        :
 5: Accept up to U characters from the current input device and     :
 6: store them at A. Basic line editing is supplied: the backspace  :
 7: key will erase the most recently entered character; pressing    :
 8: control+X will exit immediately and set SPAN to 0. Input ends   :
 9: when either CR is pressed or U characters have been accepted.   :
10: In either case a blank character is appended to the input. The  :
11: number of characters actually excepted (excluding the extra     :
12: blank) is stored in the variable SPAN. When CR is pressed, the  :
13: CR character is not stored in the input and echoed as a blank.  :
14: Example: PAD 10 EXPECT  \ read up to 10 characters into PAD     :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: EXTEND ( n -- d )                                       -       :
 4: "extend"                                                        :
 5: Convert N to a double word.                                     :
 6: Example: -5 EXTEND  \ gives -5 -1                               :
 7:                                                                 :
 8: EXTRACT ( -- c )                                        -       :
 9: "extract"                                                       :
10: Extract the current character from the current input buffer.    :
11: Does not advance >IN, so calling EXTRACT multiple times will    :
12: deliver the same character.                                     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: FENCE ( -- a )        VARIABLE                          FIG     :
 4: "fence"                                                         :
 5: The name field address of the last word in the dictionary       :
 6: that cannot be removed by FORGET. Calling EMPTY will remove     :
 7: all words defined after the one pointed to by FENCE.            :
 8:                                                                 :
 9: FILL ( a n c -- )                                       F-79    :
10: "fill"                                                          :
11: Fill N bytes starting at address A with the character C.        :
12: When N<0, do nothing.                                           :
13: Example: PAD 100 [CHAR] X FILL  \ fill PAD with 100 X's         :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: FIND ( -- a )                                           F-79    :
 4: "find"                                                          :
 5: Usage: FIND name -- find a dictionary entry for the give name   :
 6: and return its code field address (CFA). When the given name    :
 7: cannot be found, return 0;                                      :
 8: Example: FIND FIND  \ return the CFA of FIND                    :
 9:                                                                 :
10: FIND-BLOCK ( u -- a T | F )                             -       :
11: "find-block"                                                    :
12: Find a buffer containing the disk block number U. When such a   :
13: buffer exists, return its address and truth, otherwise return   :
14: false.                                                          :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: FLUSH ( -- )                                            SF      :
 4: "flush"                                                         :
 5: The same as SAVE-BUFFERS (q.v.).                                :
 6:                                                                 :
 7:                                                                 :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: FORGET ( -- )                                           F-79    :
 4: "forget"                                                        :
 5: Usage: FORGET name -- remove the dictionary entry with the      :
 6: given NAME as well as all entries that were added after NAME    :
 7: and free the unused space in the dictionary. An error will      :
 8: occur under the following conditions: (1) NAME was defined      :
 9: before the word pointed to by FENCE (q.v.). (2) The CONTEXT     :
10: vocabulary is not the CURRENT vocabulary. (3) NAME is not       :
11: contained in the CONTEXT vocabulary. When an error occurs, no   :
12: definition is removed from the dictionary.                      :
13: Example: : FOO ;  FORGET FOO  \ FOO no longer exists            :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: FORTH ( -- )          VOCABULARY                        F-79    :
 4: "forth"                                                         :
 5: The vocabulary containing the FORTH system words.               :
 6: (See VOCABULARY.)                                               :
 7:                                                                 :
 8: H ( -- a )            VARIABLE                          SF      :
 9: "h"                                                             :
10: A pointer to the free space in the dictionary. Increasing       :
11: this value will allocate dictionary space, decreasing it        :
12: will deallocate space.                                          :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: H. ( u -- )                                             -       :
 4: "h-dot"                                                         :
 5: Print U as an unsigned hexadecimal value followed by a blank.   :
 6: Example: -1 H.  \ print FFFF                                    :
 7:                                                                 :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: HD ( a n -- a )                                         -       :
 4: "h-d" "hex-dump"                                                :
 5: Print a mixed hex and character dump of 16N bytes starting      :
 6: at address A (print N lines). Print 16 bytes per line. The      :
 7: output will be similar to that of DUMP, but each line is        :
 8: prefixed by the address of the first byte in the line. The      :
 9: address of the first byte after the dump is left on the stack,  :
10: so that calling HD again will continue the output where the     :
11: previous one ended.                                             :
12: Example: TIB 5 HD  \ dump the TIB                               :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: HERE ( -- a )                                           F-79    :
 4: "here"                                                          :
 5: The address of the first free byte in the dictionary.           :
 6:                                                                 :
 7: HEX ( -- )                                              FIG     :
 8: "hex"                                                           :
 9: Set BASE to 16 (hex).                                           :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: HLD ( -- a )          VARIABLE                          FIG     :
 4: "h-l-d"                                                         :
 5: One above the address of the next digit to be emitted by #      :
 6: during pictured number conversion. For each digit, HLD will     :
 7: be decremented by 1 and then the digit will be stored at the    :
 8: resulting address. HLD begins at PAD (q.v.) and grows toward    :
 9: smaller addresses.                                              :
10:                                                                 :
11: HOLD ( c -- )                                           F-79    :
12: "hold"                                                          :
13: Usage: between <# and #> -- store an arbitrary character in the :
14: pictured number conversion output.                              :
15: Example: see <#                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: I ( -- w )            Code                              F-79    :
 4: "i"                                                             :
 5: Usage: in DO loops. Return the current loop index.              :
 6: Example: : FOO 10 0 DO I . LOOP ;  \ count from 0 to 9          :
 7:                                                                 :
 8: I' ( -- w )                                             SF      :
 9: "i-prime"                                                       :
10: Usage: in DO loops. Return the current loop limit.              :
11: Example: : FOO 10 9 DO I' . LOOP ;  \ print 10                  :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: IF ( f -- )           IMMEDIATE COMPILE-ONLY            F-79    :
 4: "if"                                                            :
 5: Usage: condition IF consequent THEN                             :
 6: If the CONDITION returns a true value, execute the words in the :
 7: "consequent". Otherwise skip over the consequent and continue   :
 8: execution after THEN.                                           :
 9: Usage: condition IF consequent ELSE alternative THEN            :
10: When ELSE is also given and the condition is false, execute the :
11: words between ELSE and THEN.                                    :
12: Example: : FOO IF -1 ELSE 0 THEN ;  \ normalize truth value     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: IMMEDIATE ( -- )                                        F-79    :
 4: "immediate"                                                     :
 5: Mark the most recently created word "immediate". When a word    :
 6: marked "immediate" is found by the compiler, it will execute    :
 7: it instead of compiling it.                                     :
 8: Example: : FOO ; IMMEDIATE  \ FOO is now immediate              :
 9:                                                                 :
10: INDEX ( n1 n2 -- )                                      -       :
11: "index"                                                         :
12: List the first line of each disk block from N1 up to (and       :
13: including) N2.                                                  :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: INTERPRET ( -- )                                        FIG     :
 4: "interpret"                                                     :
 5: Read words from the current input buffer and interpret them.    :
 6: When a word can be found in the dictionary, execute it. When    :
 7: it cannot be found, attempt to interpret it as a number and     :
 8: push its value. When that also fails, signal an error. When     :
 9: STATE is true, compile words and literals to the dictionary     :
10: instead of executing them. Words flagged IMMEDIATE (q.v.) will  :
11: be executed during compilation, words flagged COMPILE-ONLY will :
12: cause an error while interpreting. Interpretation or compilation:
13: ends, when there are no more words in the input buffer. For     :
14: details See >IN, #TIB, and BLK.                                 :
15: Example: : FOO QUERY INTERPRET ;  \ a FORTH interpreter         :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: INVERT ( w -- w )                                       EFORTH  :
 4: "invert"                                                        :
 5: Flip all bits in the machine word W.                            :
 6: Example: [HEX] FFFF INVERT  \ gives 0                           :
 7:                                                                 :
 8: IS ( -- )                                               -       :
 9: "is"                                                            :
10: Usage: DEFER name ... definition IS name -- Modify the          :
11: deferred word NAME so that its execution will cause the         :
12: previously defined word to be invoked. See DEFER.               :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: J  ( -- w )                                             SF      :
 4: "j"                                                             :
 5: Usage: in DO loops. Return the current loop index of an outer   :
 6: DO loop, i.e. the index of a DO loop in which the current DO    :
 7: loop is embedded.                                               :
 8: Example:                                                        :
 9: 5 1 DO  5 1 DO  I J * .  LOOP SPACE LOOP ;                      :
10: \ print 1 2 3  2 4 6  3 6 9                                     :
11:                                                                 :
12: KEY ( -- c )                                            F-79    :
13: "key"                                                           :
14: Wait for a character to become available on the current input   :
15: device, consume it, and return it.                              :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LAST ( -- a )         VARIABLE                          EFORTH  :
 4: "last"                                                          :
 5: The name field address (NFA) of the most recently created word  :
 6: (see CREATE). May point to an incomplete definition and/or a    :
 7: definition that is not yet linked into the dictionary.          :
 8: Example: : FOO ; LAST @ COUNT 31 AND TYPE  \ print FOO          :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LEAVE ( -- )                                            F-79    :
 4: "leave"                                                         :
 5: Usage: in DO loops. Set the current loop limit to the current   :
 6: loop index, thereby causing the loop to exit at the next LOOP,  :
 7: +LOOP, or /LOOP keyword. The body of the loop will execute      :
 8: completely before exiting. The loop index I (q.v.) will be left :
 9: unchanged.                                                      :
10: Example:                                                        :
11: : FOO 10 0 DO I 5 = IF LEAVE THEN I . LOOP ;  \ print 1 2 3 4 5 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LINK ( -- )                                             -       :
 4: "link"                                                          :
 5: Set CURRENT @ to LAST, thereby linking the most recently        :
 6: created word into the CURRENT (q.v.) vocabulary.                :
 7: Example: CREATE FOO LINK  \ link FOO into the dictionary        :
 8:                                                                 :
 9: LIST ( u -- )                                           F-79    :
10: "list"                                                          :
11: List the disk block with the number U. 64 characters will       :
12: be listed per line and each line will be preceded by a line     :
13: number. U will be stored in SCR (q.v.).                         :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LITERAL ( w -- )      IMMEDIATE COMPILE-ONLY            F-79    :
 4: "literal"                                                       :
 5: Usage: [ computation ] LITERAL -- Compile W as a literal so     :
 6: that the value W will be pushed to the stack when executing     :
 7: the word currently being compiled. Used to compile values       :
 8: that are computed at compile time.                              :
 9: Example: : FOO [ 3 4 + ] LITERAL ;  \ FOO will return 7         :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LOAD ( u -- )                                           F-79    :
 4: "load"                                                          :
 5: Load disk block U via BLOCK (q.v.), save the state of the       :
 6: current input buffer, set the loaded input buffer up for        :
 7: interpretation, and call INTERPRET (q.v.). When INTERPRET       :
 8: returns, restore the state of the input buffer. The state of    :
 9: an input buffer consists of the variables BLK, >IN, and #TIB.   :
10: A disk block U is set up for interpretation by setting BLK      :
11: to U, >IN to 0, and #TIB to B/BUF (q.v.).                       :
12: Example: 1 LOAD  \ load first disk block                        :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LOOKUP ( a1 a2 -- a f )                                 -       :
 4: "look-up"                                                       :
 5: Attempt to find a dictionary entry in the vocabulary at A2 that :
 6: matches the packed string at A1. When such an entry is found,   :
 7: return the NFA of the entry and true. When no such entry is     :
 8: found, return A1 and false.                                     :
 9: : FOO $" DUP" CONTEXT @ @ LOOKUP ;  \ look up DUP in CONTEXT    :
10:                                                                 :
11: LOOP ( -- )           IMMEDIATE COMPILE-ONLY            F-79    :
12: :loop"                                                          :
13: Usage: DO ... LOOP -- LOOP is like +LOOP with an increment of 1.:
14: Example: : FOO 10 0 DO I . LOOP ;  \ counts from 0 to 9.        :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: LSHIFT ( w1 w2 -- w )  Code                             -       :
 4: "l-shift" "left-shift"                                          :
 5: Shift the bits of the machine word W1 to the left by W2 bit     :
 6: positions, filling vacant bits with 0. Return the shifted       :
 7: machine word.                                                   :
 8: Example: BINARY 1111 2 LSHIFT  \ gives 111100                   :
 9:                                                                 :
10: M* ( n1 n2 -- d )                                       FIG     :
11: "m-star"                                                        :
12: Multiply N1 by N2 and return their product as a double word.    :
13: Example: -32768 2 M*  \ gives 0 -1                              :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: M/MOD ( d n -- nm nq )                                  -       :
 4: "m-slash-mod"                                                   :
 5: Divide the double word D by N and leave the resulting floored   :
 6: quotient (NQ) and division remainder (NM) on the stack. This    :
 7: is almost FIG FORTH's M/MOD, but this one is signed.            :
 8: Example: 1 1 16 M/MOD  \ gives 1 4096                           :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: MARK ( -- a )         COMPILE-ONLY                      -       :
 4: "mark"                                                          :
 5: Compile a placeholder machine word (0) and mark its address     :
 6: in the dictionary for later backpatching (see RESOLVE). Return  :
 7: the address of the placeholder.                                 :
 8: Example:                                                        :
 9: : IF COMPILE (0BRANCH) MARK ; IMMEDIATE COMPILE-ONLY            :
10: \ actual definition of IF                                       :
11:                                                                 :
12: MAX ( n n -- n )                                        F-79    :
13: "max"                                                           :
14: Return the greater one of two numbers on the stack.             :
15: Example: 5 7 MAX  \ gives 7                                     :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: MIN ( n n -- n )                                        F-79    :
 4: "min"                                                           :
 5: Return the smaller one of two numbers on the stack.             :
 6: Example: 5 7 MIN  \ gives 5                                     :
 7:                                                                 :
 8: MOD ( n1 n2 -- n )                                      F-79    :
 9: "mod"                                                           :
10: Return the remainder (modulo) of the division N1/N2.            :
11: Example: 255 16 MOD  \ gives 15                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: MOVE ( a1 a2 n -- )                                     F-79    :
 4: "move"                                                          :
 5: Move N machine words from A1 to A2. Start moving at lower       :
 6: addresses (like CMOVE). When N<1, do nothing.                   :
 7: Example:                                                        :
 8: 10 ARRAY A  10 ARRAY B  A B 10 CELLS MOVE                       :
 9: \ move the elements of array A to array B                       :
10:                                                                 :
11: NEGATE ( n -- n )                                       F-79    :
12: "negate"                                                        :
13: Return the negative value of N.                                 :
14: Example: 10 NEGATE  \ gives -10                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: NIP ( w1 w2 -- w2 )                                     EFORTH  :
 4: "nip"                                                           :
 5: Remove the second value on the stack, while leaving the top     :
 6: value in place.                                                 :
 7: Example: 1 2 3 NIP  \ gives 1 3                                 :
 8:                                                                 :
 9: NOT ( w -- f )                                          F-79    :
10: "not"                                                           :
11: Return truth, if W is false and otherwise return false. This    :
12: word is the same as 0=, but its intention is logical negation   :
13: rather than comparison with 0.                                  :
14: Example: 1 2 = NOT  \ gives -1                                  :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: NUMBER ( a -- n )                                       FIG     :
 4: NUMBER ( a -- n | d )                            DOUBLE SF      :
 5: "number"                                                        :
 6: Convert the string at A to a number and return its value. If    :
 7: the string does not represent a valid number with respect to    :
 8: the current base, report an error. When the double word set     :
 9: is loaded and a comma is found in the string, a double size     :
10: value will be returned. See CONVERT.                            :
11: Example: : FOO $" 123 " NUMBER ;  \ gives  123                  :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: OR ( w1 w2 -- w )     Code                              F-79    :
 4: "or"                                                            :
 5: Return the bitwise logical OR of W1 and W2.                     :
 6: Example: 7 11 OR  \ gives 15                                    :
 7:                                                                 :
 8: OVER ( w1 w2 -- w1 w2 w1 )  Code                        F-79    :
 9: "over"                                                          :
10: Push an extra copy of the second value on the stack (W1) to     :
11: the stack.                                                      :
12: Example: 1 2 3 OVER  \ gives 1 2 3 2                            :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: PAD ( -- a )                                            F-79    :
 4: "pad"                                                           :
 5: Return the address of a memory area that can be used for        :
 6: temporary storage. 64 bytes can be used in either direction     :
 7: from A. Pictured number conversion uses the memory A-1 toward   :
 8: lower addresses. There may be significantly more than 64 bytes  :
 9: of space between the PAD and the parameter stack. Use SP@ to    :
10: compute the actual amount of free space.                        :
11:                                                                 :
12: PAGE ( -- )                                             SF      :
13: "page"                                                          :
14: Clear the console screen.                                       :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: PERFORMS ( -- )        COMPILE-ONLY                     -       :
 4: "performs"                                                      :
 5: Usage: : name CREATE ... PERFORMS word ... ;                    :
 6: Fetch the subsequent word and store its parameter field address :
 7: in the code field of the most recently created word (see CREATE :
 8: and LAST). Used in defining words to alter the runtime action   :
 9: of defined words. The word following PERFORMS must be a         :
10: primitive word. Otherwise use <BUILDS and DOES>.                :
11: Example:                                                        :
12: : CONSTANT CREATE , PERFORMS (CONST) LINK ;                     :
13: \ actual implementation of CONSTANT                             :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: PFA>CFA ( a -- a )                                      -       :
 4: "p-f-a-to-c-f-a"                                                :
 5: Given the parameter field address (PFA) of a word, move to its  :
 6: code field address (CFA).                                       :
 7: Example: ' QUIT PFA>CFA  \ CFA of QUIT                          :
 8:                                                                 :
 9: PICK ( u -- w )                                         F-83    :
10: "pick"                                                          :
11: Fetch the U'th element from the stack an push an extra copy of  :
12: it. For example, 0 PICK is DUP, 1 PICK is OVER.                 :
13: Example: 1 2 3 2 PICK  \ gives 1 2 3 1                          :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: QUERY ( -- )                                            F-79    :
 4: "query"                                                         :
 5: Read up to 80 characters into the terminal input buffer (TIB)   :
 6: using EXPECT and set up the TIB for interpretation by setting   :
 7: BLK to 0, >IN to 0, and #TIB to the number of characters read.  :
 8: Do not call INTERPRET, though.                                  :
 9:                                                                 :
10: QUIT ( -- )           DEFER (QUIT)                      F-79    :
11: "quit"                                                          :
12: Clear the return stack, direct input and output to the console, :
13: and enter the outer interpreter loop.                           :
14: Example:                                                        :
15: : FOO ." Hi!" QUIT ;  \ prints Hi! and exits without prompt     :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: R0 ( -- u )           CONSTANT                          FIG     :
 4: "r-zero"                                                        :
 5: The bottom of the return stack. Note that the stack may         :
 6: grow upward or downward. On the 8086 it grows toward smaller    :
 7: addresses.                                                      :
 8:                                                                 :
 9: R> ( -- w ; w -- )    Code                              F-79    :
10: "r-from"                                                        :
11: Move one machine word from the return stack to the parameter    :
12: stack.                                                          :
13: Example: see -ROT                                               :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: R@ ( -- w )           Code                              F-79    :
 4: "r-fetch"                                                       :
 5: Copy one machine word from the return stack to the parameter    :
 6: stack.                                                          :
 7: Example:                                                        :
 8: : FOO R> R> R@ -ROT >R >R ;                                     :
 9: \ fetch second word from return stack                           :
10:                                                                 :
11: READ-BLOCK ( a u -- T | F )  Code                       -       :
12: "read-block"                                                    :
13: Read disk block U into a buffer at address A. Return true when  :
14: the read operation succeeded and otherwise return false.        :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: RECURSE ( -- )                                          EFORTH  :
 4: "recurse"                                                       :
 5: Compile the code field address (CFA) of the most recently       :
 6: created word, i.e. the word that is currently being compiled.   :
 7: The effect of RECURSE at run time is that the word will call    :
 8: itself.                                                         :
 9: Example:                                                        :
10: : FOO DUP 0= IF DROP 1 ELSE DUP 1- RECURSE * THEN ;             :
11: \ recursive factorial function                                  :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: REPEAT ( -- )         IMMEDIATE COMPILE-ONLY            F-79    :
 4: "repeat"                                                        :
 5: Usage: BEGIN ... condition WHILE ... REPEAT -- Jump back to the :
 6: BEGIN keyword of a BEGIN-WHILE-REPEAT loop. See WHILE.          :
 7:                                                                 :
 8: RESET ( -- )                                            -       :
 9: "reset"                                                         :
10: Finish cold-booting the FORTH system. Set the CURRENT and       :
11: CONTEXT dictionaries to FORTH, empty the disk buffers, set BASE :
12: to decimal, restore the default USER variable area, print a     :
13: welcome message, and abort execution, thereby transferring      :
14: control to the outer interpreter.                               :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: RESOLVE ( a -- )      COMPILE-ONLY                      -       :
 4: "resolve"                                                       :
 5: Replace the value of a previously marked (se MARK) machine word :
 6: with the value of HERE. The combination MARK and RESOLVE is used:
 7: for backpatching forward jumps. MARK marks the parameter of a   :
 8: (BRANCH) or (0BRANCH) (q.v.) word and RESOLVE later patches that:
 9: parameter, thereby redirecting the branch to HERE.              :
10: Example:                                                        :
11: : THEN RESOLVE ; IMMEDIATE COMPILE-ONLY                         :
12: \ actual implementation of THEN                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ROT ( w1 w2 w3 -- w2 w3 w1 )                            F-79    :
 4: "rote"                                                          :
 5: Rotate the third element on the stack to the top.               :
 6: Example: 1 2 3 ROT  \ gives 2 3 1                               :
 7:                                                                 :
 8: RP! ( a -- ; -- ??? )  Code                             FIG     :
 9: "r-p-store"                                                     :
10: Set the return stack pointer to A. Note that the content of the :
11: return stack will be undefined after this operation.            :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: RP@ ( -- a )          Code                              FIG     :
 4: "r-p-fetch"                                                     :
 5: Push the value of the return stack pointer to the parameter     :
 6: stack.                                                          :
 7:                                                                 :
 8: RSHIFT ( w w -- w )   Code                              -       :
 9: "r-shift" "right-shift"                                         :
10: Shift the bits of the machine word W1 to the right by W2 bit    :
11: positions, filling vacant bits with 0. Return the shifted       :
12: machine word. I.e., this is a logical shift, not an arithmetic  :
13: shift.                                                          :
14: Example: BINARY 111000 2 RSHIFT  \ gives 1110                   :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: RX? ( -- c T | F )    Code                              -       :
 4: "r-x-question"                                                  :
 5: Check if a character is available from the console device.      :
 6: When a character is available, return the character and truth,  :
 7: otherwise return false.                                         :
 8:                                                                 :
 9: S0 ( -- a )           CONSTANT                          FIG     :
10: "s-zero"                                                        :
11: The bottom of the parameter stack.  Note that the stack may     :
12: grow upward or downward. On the 8086 it grows toward smaller    :
13: addresses.                                                      :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SAVE-BUFFERS ( -- )                                     F-79    :
 4: "save-buffers"                                                  :
 5: Write all disk buffers that have been marked "updated" to       :
 6: their corresponding disk blocks and clear their "updated"       :
 7: flags. When a block cannot be written, report an error.         :
 8: Example: see COPY                                               :
 9:                                                                 :
10: SCR ( -- a )          VARIABLE                          F-79    :
11: "s-c-r"                                                         :
12: The number of the disk block most recently listed by            :
13: LIST (q.v.).                                                    :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SIGN ( n u -- u )                                       -       :
 4: SIGN ( n ud -- ud )                              DOUBLE SF [1]  :
 5: "sign"                                                          :
 6: Usage: between <# and #> -- If N is negative, insert a minus    :
 7: sign into the output of pictured number conversion. In any      :
 8: case remove N from the stack.                                   :
 9: [1] SF describes the effect of <# ... #> as ( d -- a u ) and    :
10: the the effect of <# ... SIGN #> as ( n |d| -- a u ). Because   :
11: #> cannot detect the presence of SIGN, the only possible        :
12: conclusion is that SIGN removes N, even if the text does not    :
13: explicitly state this anywhere.                                 :
14: Example: see <#                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SOURCE ( -- a )                                         -       :
 4: "source"                                                        :
 5: Return the address of the current input buffer. When BLK is     :
 6: zero, return the TIB and otherwise return the address of the    :
 7: disk buffer containing the block specified in BLK.              :
 8:                                                                 :
 9: SP! ( a -- ??? )      Code                              FIG     :
10: "s-p-store"                                                     :
11: Set the parameter stack pointer to A. Note that the content of  :
12: the parameter stack will be undefined after this operation.     :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SP@ ( -- a )          Code                              FIG     :
 4: "s-p-fetch"                                                     :
 5: Push the value of the parameter stack pointer (before pushing   :
 6: its value) to the parameter stack.                              :
 7:                                                                 :
 8: SPACE ( -- )                                            F-79    :
 9: "space"                                                         :
10: Print a single space character.                                 :
11:                                                                 :
12: SPACES ( n -- )                                         F-79    :
13: "spaces"                                                        :
14: Print N space characters. When N<1, do nothing.                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SPAN ( -- a )         VARIABLE                          F-83    :
 4: "span"                                                          :
 5: The number of characters recently accepted by EXPECT.           :
 6:                                                                 :
 7: STATE ( -- a )        VARIABLE                          F-79    :
 8: "state"                                                         :
 9: The state of the outer interpreter. When STATE is 0, the        :
10: interpreter is executing words and when state is -1 it is       :
11: compiling words.                                                :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: SWAP ( w1 w2 -- w2 w1 )  Code                           F-79    :
 4: "swap"                                                          :
 5: Exchange the top two elements on the stack.                     :
 6: Example: 1 2 3 SWAP  \ gives 1 3 2                              :
 7:                                                                 :
 8: THEN ( -- )           IMMEDIATE COMPILE-ONLY            F-79    :
 9: "then"                                                          :
10: Usage: condition IF consequent THEN                             :
11: Usage: condition IF consequent ELSE alternative THEN            :
12: The final exit point of a IF-THEN or IF-ELSE-THEN               :
13: statement. See IF.                                              :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: THRU ( u1 u2 -- )                                       -       :
 4: "thru"                                                          :
 5: Load disk blocks U1 up to (and including) U2 using LOAD.        :
 6: Example: 1 25 THRU  \ load disk blocks 1..25                    :
 7:                                                                 :
 8: TIB ( -- a )          CONSTANT                          F-83    :
 9: "t-i-b"                                                         :
10: The terminal input buffer (also called text input buffer). The  :
11: place where QUERY (q.v.) stores input typed by the user.        :
12:                                                                 :
13: TMP ( -- a )          VARIABLE                          -       :
14: "t-m-p"                                                         :
15: Temporary storage location of the system. Do not use.           :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: TX! ( c -- )          Code                              -       :
 4: "t-x-store"                                                     :
 5: Write the character C to the console device.                    :
 6:                                                                 :
 7: TYPE ( a n -- )                                         F-79    :
 8: "type:                                                          :
 9: Print N characters starting at address A. When N<1, do nothing. :
10: Example: : FOO $" Hello!" COUNT TYPE ;  \ print Hello!          :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: U. ( u -- )                                             F-79    :
 4: "u-dot"                                                         :
 5: Print N as an unsigned number with respect to the current BASE, :
 6: followed by one space character.                                :
 7: Example: 50000 U.  \ print 50000 and a blank                    :
 8:                                                                 :
 9: U.R ( u n -- )                                          EFORTH  :
10: "u-dot-r"                                                       :
11: Print U as an unsigned number with respect to the current       :
12: BASE, right-padded in a field of N blank characters. If N is    :
13: less than the number of characters occupied by U, do not emit   :
14: any padding spaces, but still print the complete number U.      :
15: Example: 50000 8 U.R  \ print "  50000"                         :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: U< ( u1 u2 -- f )                                       F-83    :
 4: "u-less-than"                                                   :
 5: Return truth, if U1 is less than U2.                            :
 6: Example: 40000 50000 U<  \ gives -1                             :
 7:                                                                 :
 8: U> ( u1 u2 -- f )                                       -       :
 9: "u-greater-than"                                                :
10: Return truth, if U1 is greater than U2.                         :
11: Example: 50000 40000 U<  \ gives -1                             :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: U/ ( u1 u2 -- u )                                       -       :
 4: "u-slash"                                                       :
 5: Remove two unsigned values and return their floored quotient,   :
 6: U1 / U2.                                                        :
 7: Example: 65535 10 U/  \ gives 6553                              :
 8:                                                                 :
 9: UDM/MOD ( ud u -- um udq )                       DOUBLE -       :
10: "u-d-m-slash-mod"                                               :
11: Divide the unsigned double word UD by U and return their        :
12: double-size floored quotient (UDQ) and single-size remainder    :
13: (modulo, UM). Unlike UM/MOD the operation cannot overflow       :
14: (unless U=0).                                                   :
15: Example: 1,234,567 10 UDM/MOD  \ gives 7 123,456                :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UM* ( u1 u2 -- ud )                                     F-83    :
 4: "u-m-star"                                                      :
 5: Return the double-word product of U1 and U2.                    :
 6: Example: 16386 16 UM*  \ gives 0 4                              :
 7:                                                                 :
 8: UM+ ( u1 u2 -- ud )   Code                              EFORTH  :
 9: "u-m-plus"                                                      :
10: Return the double-word sum of U1 and U2.                        :
11: Example: 32768 32768 UM+  \ gives 0 1                           :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UM/MOD ( ud u -- um uq )                                F-83    :
 4: "u-m-slash-mod"                                                 :
 5: Divide the unsigned double word UD by U and return their        :
 6: floored quotient (UQ) and remainder (modulo, UM).               :
 7: Example: 65,537 16 UM/MOD  \ gives -1 4096                      :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UNLOOP ( -- )                                           -       :
 4: "unloop"                                                        :
 5: Usage: DO ... UNLOOP EXIT ... LOOP -- Remove the index and      :
 6: limit of a DO loop from the return stack, so that the word      :
 7: using the loop can EXIT from within the loop. Also works with   :
 8: +LOOP and /LOOP.                                                :
 9: Example:                                                        :
10: : FOO 10 0 DO I 5 = IF UNLOOP EXIT THEN I. LOOP ;               :
11: \ print 0 1 2 3 4                                               :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UNTIL ( f -- )        IMMEDIATE COMPILE-ONLY            F-79    :
 4: "until"                                                         :
 5: Usage: BEGIN ... condition UNTIL -- Repeat execution of the     :
 6: words between BEGIN and UNTIL until the given condition returns :
 7: truth, then exit the loop. When the condition is false upon     :
 8: entering the loop for the first time, the words between BEGIN   :
 9: and UNTIL are executed once.                                    :
10: Example:                                                        :
11: : FOO 10 BEGIN DUP . 1- DUP 0= UNTIL ;  \ count from 10 to 1    :
12:                                                                 :
13: UP ( -- a )           VARIABLE                          EFORTH  :
14: "u-p"                                                           :
15: The memory area where USER variables are stored.                :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UPCASE ( a -- )                                         -       :
 4: "upcase"                                                        :
 5: Convert all letters in the packed string at address A to upper  :
 6: case.                                                           :
 7: Example: : FOO $" hello" DUP UPCASE COUNT TYPE ;  \ type HELLO  :
 8:                                                                 :
 9:                                                                 :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: UPDATE ( -- )                                           F-79    :
 4: "update"                                                        :
 5: Update the currently active disk buffer. The active buffer      :
 6: is the one most recently accessed with BLOCK or BUFFER (or      :
 7: LIST or some other words that uses BLOCK or BUFFER).            :
 8: "Updating" a buffer means to mark it "updated", so that a       :
 9: subsequent SAVE-BUFFERS operation will write it to disk.        :
10: Example: see COPY                                               :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: USER ( u -- )         Defining Word                     FIG     :
 4: "user"                                                          :
 5: Usage: n USER name -- Create a new user variable named NAME     :
 6: with an offset of N*CELL in the user area. The initial value    :
 7: of the variable is undefined. Executing NAME will return the    :
 8: address where the variable stores its value.                    :
 9: Example: 10 USER FOO  \ user variable foo uses slot 10          :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: VARIABLE ( -- )       Defining Word                     F-79    :
 4: "variable"                                                      :
 5: Usage: VARIABLE name -- Create a new variable named NAME and    :
 6: set its value to 0. When executing NAME later, return the PFA   :
 7: of the variable, which is the location where the variable       :
 8: stores its value.                                               :
 9: Example:                                                        :
10: VARIABLE FOO  10 FOO !  \ create variable FOO and set to 10     :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: VOCABULARY ( -- )     Defining Word                     F-79    :
 4: "vocabulary"                                                    :
 5: Usage: VOCABULARY name -- Create a new vocabulary named NAME.   :
 6: When executing NAME later, the vocabulary will become the       :
 7: CONTEXT vocabulary.                                             :
 8: Example:                                                        :
 9: VOCABULARY FOO  FOO  \ create FOO, make it CONTEXT vocabulary   :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: WHILE ( f -- )        IMMEDIATE COMPILE-ONLY            F-79    :
 4: "while"                                                         :
 5: Usage: BEGIN ... condition WHILE ... REPEAT -- First execute    :
 6: the words between BEGIN and WHILE. When the condition is true,  :
 7: execute the words between WHILE and REPEAT and then start over  :
 8: at BEGIN. When the condition is false, leave the loop and       :
 9: continue execution after REPEAT. When the condition is false    :
10: upon entering the loop for the first time, the words between    :
11: WHILE and REPEAT are never executed.                            :
12: Example:                                                        :
13: : FOO BEGIN KEY DUP 27 <> WHILE EMIT REPEAT ;                   :
14: \ echo keys until ESC is pressed                                :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: WIPE ( -- )                                             SF      :
 4: "wipe"                                                          :
 5: Wipe the currently active disk buffer by overwriting it with    :
 6: blanks.                                                         :
 7: Example: 999 BUFFER WIPE  \ allocate and wipe block 999         :
 8:                                                                 :
 9: WITHIN ( u ul uh -- f )                                 EFORTH  :
10: "within"                                                        :
11: Return truth, if UL <= U < UH.                                  :
12: Example: 65 32 127 WITHIN  \ gives -1                           :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: WORD ( c -- a )                                         F-79    :
 4: "word"                                                          :
 5: Extract letters from the current input buffer and advance >IN   :
 6: until the character C is found or the end of the input buffer   :
 7: is reached. Copy the extracted characters to a packed string    :
 8: located at HERE (q.v.). Finally return the address of the       :
 9: packed string. A C character will be appended to the packed     :
10: string, but not counted. When the end of the input buffer is    :
11: reached before extracting the first character, return the       :
12: address of a zero-length packed string.                         :
13: Example: : FOO BL WORD COUNT TYPE ;  \ echo word after FOO      :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: WORDS ( -- )                                            EFORTH  :
 4: "words"                                                         :
 5: Print all words contained in the CONTEXT dictionary. Pause      :
 6: every 200 words by calling ?ENOUGH (q.v.).                      :
 7:                                                                 :
 8: WRITE-BLOCK ( a u -- a | F )  Code                      -       :
 9: "write-block"                                                   :
10: Write the buffer at address A to disk block U. Return true      :
11: when the write operation succeeded and otherwise return false.  :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: XOR ( w1 w2 -- w )    Code                              F-79    :
 4: "x-or"                                                          :
 5: Return the bitwise logical exclusive OR of W1 and W2.           :
 6: Example: BINARY 1010 1111 XOR  \ gives 0101                     :
 7:                                                                 :
 8: [ ( -- )              IMMEDIATE                         F-79    :
 9: "left-bracket"                                                  :
10: End compiling and start interpreting. Set STATE to 0.           :
11: Example: see LITERAL                                            :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: ['] ( -- a )          IMMEDIATE COMPILE-ONLY            F-83    :
 4: "bracket-tick"                                                  :
 5: Usage: ['] name -- Look up the given NAME in the dictionary and :
 6: compile its PFA as a literal.                                   :
 7: Example: : FOO ['] TX! 'EMIT ! ;  \ set 'EMIT to TX!            :
 8:                                                                 :
 9: [CHAR] ( -- c )       IMMEDIATE                         -       :
10: "bracket-char"                                                  :
11: Usage: [CHAR] ccc --- When interpreting, leave the ASCII code   :
12: of the first of the characters ccc on the stack. When compiling,:
13: compile that ASCII code as a literal.                           :
14: Example: : FOO [CHAR] A ;  \ returns 65                         :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: [COMPILE] ( -- )      IMMEDIATE COMPILE-ONLY            F-79    :
 4: "bracket-compile"                                               :
 5: Usage: [COMPILE] word -- Compile the code field address (CFA)   :
 6: of the subsequent word and skip over that word. Used to compile :
 7: words flagged IMMEDIATE (q.v.).                                 :
 8: Example:                                                        :
 9: : WHILE [COMPILE] IF ; IMMEDIATE COMPILE-ONLY                   :
10: \ IF and WHILE share the same code                              :
11: \ Yes, x WHILE y THEN works, but don't do this!                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: [HEX] ( -- w )        IMMEDIATE                         -       :
 4: "bracket-hex"                                                   :
 5: Usage: [HEX] number -- interpret NUMBER as a hexa-decimal number:
 6: (using NUMBER) and push its value to the stack. When compiling, :
 7: compile the value as a literal. Note: [HEX] parses a single-word:
 8: number, even if the double word set is loaded.                  :
 9: Example: : FOO [HEX] FFFF ;  \ returns 65535 (or -1)            :
10:                                                                 :
11:                                                                 :
12:                                                                 :
13:                                                                 :
14:                                                                 :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3: \ ( -- )              IMMEDIATE                         EFORTH  :
 4: "backslash"                                                     :
 5: Usage: \ ccc -- A comment. Skip to the next line of input. When :
 6: reading the TIB (q.v.), this means to ignore the rest of the    :
 7: characters in the TIB. When reading a disk buffer, this means   :
 8: to advance to the next multiple of 64 characters.               :
 9: Example: \ this is ignored                                      :
10:                                                                 :
11: ] ( -- )                                                F-79    :
12: "right-bracket"                                                 :
13: End interpreting and start compiling. Set STATE to 1.           :
14: Example: see LITERAL                                            :
15:                                                                 :
16:                                                                 :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3:         : RESERVED [2]       : FC00h    MEMORY LAYOUT           :
 4:  B1ADDR : BLOCK BUFFER 2     : F800h    -------------           :
 5:  B0ADDR : BLOCK BUFFER 1     : F400h    v = growing down        :
 6:      UP : USER AREA          : F380h                            :
 7:  R0, UP : RETURN STACK    v  : F380h    [1] PSP (under DOS) or  :
 8:     TIB : TIB                : F000h        BIOS variables      :
 9: S0, TIB : PARAMETER STACK v  : F000h                            :
10:         : FREE SPACE         :          [2] The loader maps the :
11:     PAD : PAD                :              kernel to 40:100,   :
12:    HERE : FREE SPACE         :              so in systems with  :
13:         : USER DICTIONARY    :              64K bytes of RAM    :
14:         : PRECOMPILED SYSTEM :              this region is not  :
15:         : VIRTUAL MACHINE    : 0100h        available.          :
16:         : RESERVED [1]       : 0000h                            :

 1: ( T3XFORTH Glossary )                                           :
 2:                                                                 :
 3:                                                                 :
 4: DICTIONARY ENTRY FORMAT                                         :
 5: -                                                               :
 6: I = IMMEDIATE BIT, HEX 80     LEN = NAME LENGTH (MASK HEX 1F)   :
 7: C = COMPILE-ONLY BIT, HEX 40  NAME_I = I'TH CHARACTER OF NAME   :
 8:                                                                 :
 9: 0h : I | C | LEN |   NAME_1                                     :
10: 2h :   NAME_2    |   NAME_3                                     :
11: 4h :   NAME_4    |   NAME_5                                     :
12: 8h :   LINK FIELD                                               :
13: Ah :   CODE FIELD                                               :
14: Ch :   PARAMETER FIELD                                          :
15:                                                                 :
16:                                                                 :

contact  |  privacy