Glossary 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. eForth 1.0 Glossary
  2. Derived from bFORTH by Bill Muench, 1990.
  3. WARNING: Advanced information -- subject to change.
  4. ================================================================
  5. Sort order
  6. !"#$%&'()*+,-./digits:;<=>?@Alpha[\]^_`{|}~
  7. ================================================================
  8. Attributes Capitalized symbols.
  9. C the word may only be used during compilation of a colon definition.
  10. D the word is a defining word.
  11. I the word is IMMEDIATE and will execute during compilation, unless special action is taken.
  12. U a user value.
  13. ================================================================
  14. Stack notes
  15. ( compile \ run \ child ;Return ;Float ; <input stream> )
  16. ( before -- after ;R before -- after ;F before -- after ; <string> )
  17. ================================================================
  18. Glossary
  19. ! ( w a -- ) "store"
  20. Store a 16-bit number at aligned address.
  21. !CSP ( -- ) "set c s p"
  22. Save the values of the current stack pointers.
  23. !IO ( -- ) "store i o"
  24. Initialize the serial I/O device.
  25. # ( d -- d ) "number sign"
  26. Convert one digit of a number using the current base. Must be used within <# and #> .
  27. #> ( d -- b u ) "number sign greater"
  28. Terminate a numeric conversion.
  29. #S ( ud -- 0 0 ) "number sign s"
  30. Convert all digits of a number using the current base.
  31. #TIB ( -- a ) "number t i b"
  32. The system double variable which holds the size and aligned address of the terminal input buffer.
  33. $" ( -- ; <string> \ -- $ ) I,C "string quote"
  34. Used only within a definition to compile an inline packed string terminated by the " double quote character. At run-time the address of the packed string is pushed on the data stack.
  35. $"| ( -- $ ) C "string quote primitive"
  36. Return the address of a compiled inline packed string. The run-time primitive compiled by " .
  37. $," ( -- ; <string> ) "string comma quote"
  38. Compile an inline packed character string into the code area, terminated by the " double quote character.
  39. $,n ( $ -- ) "string comma n"
  40. Create a name for a definition using string. Set the code pointer to the next free cell in the code area, no code is compiled.
  41. The name is not linked into the dictionary.
  42. $COMPILE ( $ -- )
  43. Convert a string to a word address. Execute the word in interpreting mode or compile it if in compiling mode.
  44. $INTERPRET ( $ -- ) "string interpret"
  45. At the interactive level, if a word is defined perform its action. If not, try to convert it to a number, if that fails, issue an error message.
  46. ' ( -- ca ; <string> ) "tick"
  47. Return the code address of the word following.
  48. '?KEY ( -- a ) U "tick question key"
  49. The system input device status vector.
  50. 'BOOT ( -- a )
  51. Return the address of a system boot-up routine.
  52. 'ECHO ( -- a ) U "tick echo"
  53. The system echo device vector.
  54. 'EMIT ( -- a ) U "tick emit"
  55. The system output device vector.
  56. 'EVAL ( -- a ) "tick eval"
  57. The system interpret/compile vector.
  58. 'EXPECT ( -- a ) U "tick expect"
  59. The system line input vector.
  60. 'NUMBER ( -- a ) "tick number"
  61. The system number conversion vector.
  62. 'PROMPT ( -- a ) U "tick prompt"
  63. The system prompt vector.
  64. 'TAP ( -- a ) U "tick tap"
  65. The input case function vector.
  66. ( ( -- ; <string> ) I "paren"
  67. Begin a comment. The comment is terminated by the ) character. May be used inside or outside a definition.
  68. * ( n n -- n ) "star"
  69. Multiply two signed numbers. Return a 16-bit signed number.
  70. */ ( n1 n2 n3 -- q ) "star slash"
  71. Multiply n1 by n2 producing the 32-bit intermediate product d. Divide d by n3 producing a 16-bit quotient.
  72. */MOD ( n1 n2 n3 -- r q ) "star slash mod"
  73. Multiply n1 by n2 producing the 32-bit intermediate product d. Divide d by n3 producing a 16-bit remainder and a 16-bit quotient.
  74. + ( w w -- w ) "plus"
  75. Addition.
  76. +! ( n a -- ) "plus store"
  77. Increment the 16-bit value at address by n.
  78. , ( w -- ) "comma"
  79. Compile a 16-bit value into the code area.
  80. - ( w w -- w ) "minus"
  81. Subtract the top from the second element on the data stack.
  82. -TRAILING ( b u -- b u ) "dash trailing"
  83. Adjust the count to eliminate any trailing white-space in the string.
  84. . ( n -- ) "dot"
  85. Display the single value, use the current base. If BASE is DECIMAL , display as a signed number.
  86. ." ( -- ; <string> ) I,C "dot quote"
  87. Used only within a definition to compile an inline packed string terminated by the " double quote character. At run-time the string is displayed on the current output device.
  88. ."| ( -- ) C "dot quote primitive"
  89. Display a compiled inline packed string to the current output device. This run-time primitive is compiled by ." .
  90. .( ( -- ; <string> ) I "dot paren"
  91. Begin a comment that is displayed to the current output device. May be used inside or outside a definition.
  92. .ID ( na -- ) "dot i d"
  93. Display the packed string at address.
  94. .OK ( -- ) "dot o k"
  95. Display the standard system prompt.
  96. .R ( n +n -- ) "dot r"
  97. Display the single value right-justified in a field of width +n, use the current base.
  98. .S ( ? -- ? ) "dot s"
  99. Display the contents of the data stack.
  100. / ( n n -- q ) "slash"
  101. Floored division for 16-bit numbers. Returns only the 16-bit quotient.
  102. /MOD ( n n -- r q ) "slash mod"
  103. Floored division for 16-bit numbers. 16-bit remainder and 16-bit quotient.
  104. 0< ( n -- t ) "zero less"
  105. Return true if n is less than 0, negative. Comparison is signed. Also used for sign extension.
  106. 0= ( w -- t ) "zero equals"
  107. Return true if w is equal to 0.
  108. 2! ( d a -- ) "two store"
  109. Store a 32-bit value at aligned address.
  110. 2@ ( a -- d ) "two fetch"
  111. Return the 32-bit value stored at aligned address.
  112. 2DROP ( d -- ) "two drop"
  113. Pop the 32-bit number, or the top two 16-bit numbers, from the data stack.
  114. 2DUP ( d -- d d ) "two dupe"
  115. Duplicate the 32-bit number, or the top two 16-bit numbers, on the data stack.
  116. : ( -- ; <string> ) D "colon"
  117. Begin a colon definition to be added to the current vocabulary.
  118. ; ( -- ) I,C "semicolon"
  119. Terminate a colon definition begun with : .
  120. < ( n1 n2 -- t ) "less than"
  121. Return true if n1 is less than n2. Comparison is signed.
  122. <# ( -- ) "start number" "less number sign"
  123. Begin a numeric conversion.
  124. = ( w w -- t ) "equals"
  125. Return true if w1 is equal to w2.
  126. >CHAR ( u -- c ) "to character"
  127. Convert a value to a printable character. Replace an unprintable character with the _ underscore character.
  128. >IN ( -- a ) "to in"
  129. The pointer into the input stream.
  130. >NAME ( ca -- na, F ) "to name"
  131. If possible, convert a code address to a name address. If not possible, return a false flag.
  132. >R ( w -- ;R -- w ) C "to r"
  133. Pop the top element of the data stack and Push it on the return stack.
  134. ? ( a -- ) "question"
  135. Display the single value stored at address, use the current base. If BASE is DECIMAL , display as a signed number.
  136. ?branch ( f -- ) "question branch"
  137. Run time rouitne to redirect execution to the address in the next cell if flag is false.
  138. ?CSP ( -- ) "question c s p"
  139. Compare the current value of the stack pointers with the saved values. ABORT with an error message if different.
  140. ?DUP ( w -- w w, 0 ) "question dupe"
  141. Duplicate the number on top of the data stack only if it is non-zero.
  142. ?KEY ( -- t ) "question key"
  143. Return the status of the current input device.
  144. ?RX ( -- c T, F ) "question r x"
  145. Return a character from the input device and true. Return false only if no character is pending.
  146. ?STACK ( -- ) "question stack"
  147. Display an error message if the stack limits have been exceeded.
  148. ?UNIQUE ( $ -- $ ) "question unique"
  149. Display a warning massage for a duplicate definition.
  150. @ ( a -- w ) "fetch"
  151. Return the 16-bit value stored at aligned address.
  152. @EXECUTE ( a -- ) "fetch execute"
  153. Fetch the execution token stored at address and execute it, ie indirect execution. If the value contained in address is zero, do nothing.
  154. ABORT ( -- )
  155. Reset the data stack and perform the function of QUIT . Note, no message is displayed.
  156. ABORT" ( -- ; <string> \ f -- ) I,C "abort quote"
  157. Used only within a definition to compile an inline packed string terminated the " double quote character. At run-time, if the flag
  158. is false, execute the sequence of words following the string. Otherwise, the string is displayed on the current output ce,
  159. execution is then passed to an error handling routine.
  160. abort" ( f -- ) C "abort quote primitive"
  161. The run-time primitive compiled by ABORT" .
  162. ABS ( n -- +n )
  163. Return the absolute value of n.
  164. accept ( b u -- b u )
  165. Receive a line of u characters maximum to the an input buffer at byte address. Terminate input if a carriage return is received. Return the actual count of received characters. Perform any currently defined keyboard macros. Use the current input device.
  166. AFT ( a -- a a \ -- ) I,C
  167. Used within a loop structure to unconditional skip a portion of code the first time thru the loop. AFT compiles the machine unconditional branch instruction and leaves an address to be resolved by THEN .
  168. AGAIN ( a -- \ -- ) I,C
  169. Terminate an infinite loop structure. AGAIN compiles an unconditional branch instruction, and uses the address left by BEGIN to resolve this backward branch.
  170. AHEAD ( -- a \ -- ) I,C
  171. Mark the beginning of a forward branching, unconditional branch structure. AHEAD compiles the machine unconditional branch instruction and leaves an address to be resolved by THEN .
  172. ALIGNED ( b -- a )
  173. Convert a byte address to a word aligned address.
  174. ALLOT ( n -- )
  175. Adjust the code area pointer by n.
  176. AND ( w w -- w )
  177. A bitwise logical AND.
  178. BASE ( -- a ) U
  179. The system variable which holds the current numeric conversion radix.
  180. BEGIN ( -- a \ -- ) I,C
  181. Mark the beginning of an indefinite loop structure. Leave an address to be resolved by UNTIL, or WHILE and REPEAT .
  182. BL ( -- c ) "b l"
  183. Push the value of a space, the blank character, on the data stack.
  184. branch ( -- ) C
  185. Run time routine to redirect execution to the address in the next cell.
  186. BYE ( -- )
  187. Exit Forth and return to the underlying environment or DOS.
  188. C! ( v b -- ) "c store"
  189. Store an byte value at byte address.
  190. C@ ( b -- v ) "c fetch"
  191. Return the byte value stored at byte address.
  192. CALL, ( a -- ) C "call comma"
  193. Assemble a 4 byte subroutine call to the designated address.
  194. CATCH ( ca -- err#/0 )
  195. Setup a local error frame and execute the word referenced by the execution token ca. Return a non-zero error number or zero for no error.
  196. CELL+ ( a1 -- a2 ) "cell plus"
  197. Add cell size in bytes to address a1.
  198. CELL- ( a1 -- a2 ) "cell minus"
  199. Subtract cell size in bytes to address a1.
  200. CELLS ( n1 -- n2 )
  201. Multiply n1 by the cell size in byte.
  202. CHAR ( -- c ; <string> )
  203. Return the value of the first character in <string>. If used within a defintion, use the phrase [ CHAR <string> ] LITERAL.
  204. CHARS ( +n c -- )
  205. Display +n of character to the current output device.
  206. CMOVE ( b1 b2 u -- ) "c move"
  207. Move u byte values from byte address b1 to b2, proceeding from lower to higher memory. Overwrite occurs if b1<b2<b1+u .
  208. COLD ( -- )
  209. Completely re-initialize the system, but does not re-load the system from ROM.
  210. COMPILE ( -- ) C
  211. Used only within a definition. At run-time the word following COMPILE is not executed, but its code address is copied into the code area.
  212. CONSOLE ( -- )
  213. Initialize the vectored input and output devices to a terminal.
  214. CONTEXT ( -- a )
  215. The variable used to specify the dictionary search order.
  216. COUNT ( $ -- b +n )
  217. Return the byte address and byte count of a packed string.
  218. CP ( -- a ) "c p"
  219. The pointer to the next available dictionary location in code space. Since code and names are seperated, the traditional DP, dictionary pointer, had to be split into CP, code pointer, and NP, name pointer.
  220. CR ( -- ) "carriage return"
  221. Position the cursor at the beginning of the next line of the current output device.
  222. CREATE ( -- ; <string> \ -- a ) D
  223. Build a named definition. At run-time the address pointing to next availabe code space is pushed on the data stack.
  224. CSP ( -- a ) "c s p"
  225. The system variable which holds the current stack pointer. Used for error checking.
  226. CURRENT ( -- a )
  227. The variable used to specify the vocabulary in which new definitions are compiled.
  228. DECIMAL ( -- )
  229. Set decimal as the current BASE . Base 10.
  230. DEPTH ( -- n )
  231. The number of elements on the data stack, does not include n .
  232. DIGIT ( u -- c )
  233. Convert a single digit number to its character value.
  234. DIGIT? ( c base -- v t ) "digit question"
  235. Try to convert a character to binary digit. Return true if the digit is valid for the current base.
  236. dm+ ( a u -- p a+ ) "d m plus"
  237. Display the 16-bit values starting at the aligned address a.
  238. DNEGATE ( d -- -d ) "d negate"
  239. Return the two's complement a double number. Change the sign of a double number.
  240. do$ ( -- $ ) C "do string"
  241. Return the address of a compiled inline packed string.
  242. doLIST ( a -- ) C "do list"
  243. The run-time routine which executes the list in a colon definition pointed to by a.
  244. doLIT ( -- n ) C "do literal"
  245. Return the in-line literal compiled by LITERAL.
  246. doUSER ( -- ) C "do user variable"
  247. The run-time action of user variables.
  248. doVAR ( -- a ) C "do variable"
  249. The run-time action of variable.
  250. DROP ( w -- )
  251. Remove the top element on the data stack.
  252. DUMP ( a u -- )
  253. Display the HEX and character values starting at aligned address a, for count u.
  254. DUP ( w -- w w ) "dupe"
  255. Duplicate the top element on the data stack.
  256. ELSE ( -- \ a -- a ) I,C
  257. Used within a conditional branch structure. ELSE resolves a forward conditional branch compiled by IF . ELSE then compiles an unconditional branch instruction, leaving an address to be resolve by THEN .
  258. EMIT ( w -- )
  259. Output a character to the current output device.
  260. EVAL ( -- )
  261. Interpret or compile the tokens from the input stream.
  262. EXECUTE ( w -- ;R -- w )
  263. Execute the word definition indicated by the execution token w.
  264. EXIT ( -- ;R w -- )
  265. Compile a subroutine return.
  266. EXPECT ( b u -- )
  267. Receive a line of u characters maximum to the an input buffer at byte address. Terminate input if a carriage return is received. The count of received characters is saved in the variable SPAN. Use the current input device. This word is vectored.
  268. EXTRACT ( d base -- d' c )
  269. Used incrementally to convert each digit in a number to its character value.
  270. FILE ( -- )
  271. Specify system input from a file using pace handshake. File input is not echoed, all output messages are displayed.
  272. FILL ( b u v -- )
  273. Fill an area at byte address of length u using the byte value v.
  274. find ( $ va -- ca f, $ F ) "find primitive"
  275. Given a string and a dictionary entry thread, search for a name match. If found, return the code address and a true flag. If not
  276. found, the string address and a false flag.
  277. FOR ( u -- ) I,C
  278. Begin a down-counting loop. Repeat the loop till NEXT u+1 times from u to 0.
  279. FORTH ( -- )
  280. Make the default system vocabulary FORTH the context vocabulary.
  281. HAND ( -- )
  282. Specify system input from keyboard, no handshake. All input is echoed.
  283. HANDLER ( -- a )
  284. The current error handler frame pointer.
  285. HERE ( -- a )
  286. Push the address of the next free cell in the code area on the data stack.
  287. HEX ( -- )
  288. Set hexadecimal as the current BASE . Base 16.
  289. hi ( -- )
  290. Display the sign-on message.
  291. HLD ( -- a ) "h l d"
  292. The pointer to a formatted numeric output string.
  293. HOLD ( c -- )
  294. Insert the character in the formatted numeric output string.
  295. I/O ( -- a ) "i slash o"
  296. An array used by CONSOLE to initialize the system input and output vectors. The vector order is 'KEY? 'KEY and 'EMIT.
  297. IF ( -- a \ f -- ) I,C
  298. Mark the beginning of a forward branching, conditional branch structure. IF compiles the machine conditional branch instruction and leaves an address to be resolved by THEN or ELSE .
  299. IMMEDIATE ( -- )
  300. Mark the most recently created dictionary entry as a word which will execute during compilation.
  301. INVERT ( w -- w )
  302. Bitwise logical invert. Equivalent to -1 XOR. The one's complement.
  303. KEY ( -- c )
  304. Return a character from the current input device. If no key is ready, wait until one is available.
  305. kTAP ( b b b c -- b b b ) "k tap"
  306. The 'tap routine used for file input.
  307. LAST ( -- a )
  308. The pointer to the name of the most recently created dictionary entry.
  309. LITERAL ( w -- \ -- w ) I
  310. Compile a number as an inline value.
  311. M* ( n n -- d ) "m star"
  312. Multiply two signed numbers. Return a 32-bit signed number.
  313. M/MOD ( d n -- r q ) "m slash mod"
  314. Floored division of a 32-bit number divided by a 16-bit number. Return a 16-bit quotient and a 16-bit remainder.
  315. MAX ( n n -- n )
  316. Leave the greater of the two signed values.
  317. MIN ( n n -- n )
  318. Leave the smaller of the two signed values.
  319. MOD ( n n -- r )
  320. Floored division for 16-bit numbers. Returns only the 16-bit remainder.
  321. NAME> ( na -- ca ) "name to code"
  322. Convert a name address to a code address.
  323. NAME? ( $ -- ca f, $ F ) "name question"
  324. Given a string, search for a name match. If found, return the code address and a true flag. If not found, the string address and a
  325. false flag.
  326. NEGATE ( n -- -n )
  327. Equivalent to 0 SWAP-. The two's complement of a number. Change the sign of a number.
  328. NEXT ( a -- \ -- ;R u -- [u-1] ) I,C
  329. Terminate a down-counting loop structure. NEXT compiles the machine loop instruction, pointing to the address left by FOR . The
  330. loop count is held on the return stack. Looping continues until the count is equal to zero.
  331. next ( -- ) C
  332. Run-time routine to terminate a down-counting FOR-NEXT loop. See NEXT.
  333. NP ( -- a ) "n p"
  334. The pointer to the next available dictionary location in name space.
  335. NUF? ( -- t ) "nuf question"
  336. Continue until paused or terminated by user. Any key will pause, while paused any key except 'enter' will restart and return
  337. false, enter will return true.
  338. NULL$ ( -- $ ) "null string"
  339. The address of a string with a zero count.
  340. NUMBER? ( $ -- d T, $ F ) "number question"
  341. Try to convert a packed string to binary number. If possible return the number and a true. Otherwise, return the string address
  342. and false. A leading '$' for hexidecimal, a leading '-' for negative, and/or the decimal point for a double number.
  343. OR ( w w -- w )
  344. A bitwise logical OR.
  345. OVER ( w1 w2 -- w1 w2 w1 )
  346. Copy the second element to the top of the data stack.
  347. OVERT ( -- )
  348. Used by ; to link a successfully defined word into the search order.
  349. PACE ( -- )
  350. Send the file transfer handshake character.
  351. PACK$ ( b u $ -- $ ) "pack string"
  352. Move and convert the string at byte address with byte count to a packed string at address $ .
  353. PAD ( -- a )
  354. Short for scratch pad. Address of a temporary buffer.
  355. PARSE ( c -- b u ; <string> )
  356. Scan the current input stream for the given character as a delimiter. Return the beginning byte address and count of the delimited string.
  357. parse ( b u c -- b u delta ; <string> )
  358. Scan string for the given character as a delimiter. Return the beginning byte address and count of the delimited string. Delta is the beginning to current offset.
  359. PICK ( +n -- w )
  360. Copy the +nth data stack value to the top of the data stack.
  361. PRESET ( -- ) C
  362. Clear the data stack, the return stack and initialize system.
  363. QUERY ( -- )
  364. Receive a line to the current input buffer from current input device.
  365. QUIT ( -- )
  366. Clear the return stack, set interpret state, and return control to the current command line interpreter.
  367. R> ( -- w ;R w -- ) C "r from"
  368. Pop the top element of the return stack and Push it on the data stack.
  369. R@ ( -- w ;R w -- w ) "r fetch"
  370. Copy the top element of the return stack and Push it on the data stack.
  371. RECURSE ( -- \ -- ;R -- a ) I,C
  372. Used only within the word currently being defined to allow self reference. Recursion.
  373. REPEAT ( a a -- \ -- ) I,C
  374. Terminate an indefinite loop structure. REPEAT compiles an unconditional branch instruction, and uses the address left by WHILE to resolve this backward branch.
  375. ROT ( w1 w2 w3 -- w2 w3 w1 ) "rote"
  376. Rotate the top three elements on the data stack. Third element to top and all other shifted down.
  377. RP! ( a -- ) C "r p store"
  378. Set the return stack pointer to address.
  379. RP0 ( -- a ) "r p zero"
  380. Return the bottom address of the return stack pointer.
  381. RP@ ( -- a ) "r p fetch"
  382. Return the address of the return stack pointer.
  383. SAME? ( a1 a2 u -- a1' f \ -0+ ) "same question"
  384. Compare the two strings, return the beginning address of the first string and a truth flag.
  385. SIGN ( n -- )
  386. Display a minus sign if n is negative. Must be used within <# and #> .
  387. SP! ( a -- ) "s p store"
  388. Set the data stack pointer to address.
  389. SP0 ( -- a ) "s p zero"
  390. Return the bottom address of the data stack pointer.
  391. SP@ ( -- a ) "s p fetch"
  392. Return the address of the data stack pointer.
  393. SPACE ( -- )
  394. Display one space, blank character, to the current output device.
  395. SPACES ( +n -- )
  396. Display +n spaces, blank characters, to the current output device.
  397. SPAN ( -- a )
  398. The system variable which holds the count of characters input by EXPECT.
  399. str ( d -- b u ) "s t r"???
  400. Convert number to a string in current BASE . Signed if DECIMAL .
  401. SWAP ( w1 w2 -- w2 w1 )
  402. Exchange the top two elements on the data stack.
  403. TAP ( b b b c -- b b b' )
  404. Echo and store the keystroke, and update the cursor position.
  405. temp ( -- a ) U
  406. Return address of a user variable for temporary storage.
  407. THEN ( a -- \ -- ) I,C
  408. Terminate a conditional branch structure. Resolves a forward branch compiled by IF, ELSE, AHEAD, or AFT.
  409. THROW ( err# -- err# )
  410. Reset the state of the system to the current local error frame, and update the error flag.
  411. TIB ( -- a ) "t i b"
  412. Address of the terminal input buffer.
  413. TOKEN ( -- $ ; <string> )
  414. Scan the current input stream for a blank delimited word. Move the word to the end of the names area as a packed string. Return the address of the packed string.
  415. TX! ( c -- ) "t x store"
  416. Send a character to the output device. Primitive of EMIT.
  417. TYPE ( b u -- )
  418. Output u characters of the string at b address to the current output device.
  419. U. ( u -- ) "u dot"
  420. Display the unsigned single value, use the current base.
  421. U.R ( u +n -- ) "u dot r"
  422. Display the unsigned single value right-justified in a field of width +n, use the current base.
  423. U< ( u1 u2 -- t ) "u less"
  424. Return true if u1 is less than u2. Comparison is unsigned.
  425. UM* ( u u -- ud ) "u m star"
  426. Multiply two unsigned 16-bit numbers. Return an unsigned 32-bit number.
  427. UM+ ( u u -- ud ) "u m plus"
  428. Add two unsigned numbers and return a 32-bit sum.
  429. UM/MOD ( ud u -- ur uq ) "u m slash mod"
  430. Unsigned division of a 32-bit number divided by a 16-bit number. Return an unsigned 16-bit quotient and an unsigned 16-bit remainder.
  431. UNTIL ( a -- \ f -- ) I,C
  432. Terminate an indefinite loop structure. Condition testing is done after executing the code within the loop. UNTIL compiles the machine conditional branch instruction, and uses the address left by BEGIN to resolve this backward branch.
  433. UP ( -- a ) "u p"
  434. Return the address of the current user area.
  435. USER ( u -- ; <string> \ -- a ) D
  436. Build a named user variable with an offset from the current user base. At run-time the address of the variable is pushed on the
  437. data stack.
  438. VARIABLE ( -- ; <string> \ -- a ) D
  439. Build a named variable. At run-time the address of the variable is pushed on the data stack.
  440. VER ( -- n )
  441. Return the version code. Major revision is in the high byte and minor release in the low byte.
  442. VOCABS ( -- a )
  443. Return the address of the first vocabulary FORTH in the vocabulary area.
  444. WHILE ( a -- a a \ f -- ) I,C
  445. Used within an indefinite loop structure. Condition testing is done before executing the code within the loop. WHILE compiles the machine conditional branch instruction and leaves an address to be resolved by REPEAT .
  446. WITHIN ( u lo hi -- t )
  447. Return true if lo <= u < hi. Comparison is unsigned and circular.
  448. WORD ( c -- $ ; <string> )
  449. Scan the current input stream for the string delimited by 'c'. Return the address of the packed string.
  450. WORDS ( -- )
  451. Display the words in the CONTEXT vocabulary. Display continues until paused or terminated by user.
  452. XIO ( a1 a2 a3 -- ) "x i o"
  453. Revector 'prompt, 'echo and 'tap to the code addresses on the stack.
  454. XOR ( w w -- w )
  455. Bitwise logical Exclusive OR.
  456. [ ( -- ) I "left bracket"
  457. Begin interpreting text from the input stream. Change from compiling to interpreting.
  458. [COMPILE] ( -- ; <string> \ -- ) I "bracket compile"
  459. Used only within a definition to force the compilation of the following IMMEDIATE word.
  460. \ ( -- ; <string> ) I "backslash"
  461. Begin a comment. The comment is terminated by the system end-of-line character. May be used inside or outside a definition.
  462. ] ( -- ) "right bracket"
  463. Change from interpreting to compiling.
  464. ^H ( b b b -- b b b' ; <backspace> ) "control h"
  465. A keyboard macro to delete characters from the current input stream. No action is taken if the beginning of the input stream is reached.
  466. _TYPE ( b u -- ) "printable type"
  467. Display the the string starting at the byte address b, for count u. Substitute _ the underscore character, for unprintable charact!_TY