! ( n adr -- ) Stores a number at adr!csp ( -- ) Remembers the stack pointer" ( -- adr len ) ccc" Collects a string from the input stream"" ( -- adr ) ccc Collects a word from the input stream", ( adr len -- ) Places a string at the top of the dictionary". ( adr -- ) Displays a packed string. Equivalent to COUNT TYPE"chdir ( string -- ) Changes to the directory whose name is the packed string "string""command ( string -- ) Executes the system command line contained in the packed string "string""compile ( string -- ) Compiles or interprets a word"copy ( fromadr toadr -- ) Copies a packed string from fromadr to toadr"create ( str -- ) Defines a word from a string on the stack"load ( filename -- ) Interprets the file whose name is the packed string on the stack"temp ( -- str ) Converts a digit in pictured numeric output#> ( l -- adr +n ) Ends pictured numeric output#align ( -- n ) The alignment granularity for the cpu; 2 for 68000#line ( -- adr ) User variable containing the line number on the output device#out ( -- adr ) User variable containing the column number on the output device#s ( +l -- 0 ) Converts the rest of the digits in pictured numeric output#threads ( -- n ) The number of threads used by the dictionary hashing scheme#tib ( -- adr ) Size of Terminal Input Buffer#user ( -- n ) The first unused USER area offset#vocs ( -- n ) The number of vocabularies that can be in the search order at one time' ( -- acf ) name Finds a word in the dictionary'user# ( -- user# ) name Finds the user number associated with the word if there is one'word ( -- adr ) The address where WORD puts its string( ( -- ) Begins a comment(") ( -- adr len ) Run-time word compiled by "("s) ( -- adr ) Run-time word compiled by [""](') ( -- acf ) Run-time word compiled by ['](+loop) ( n -- ) Run-time word compiled by +LOOP(.") ( -- ) Run-time word compiled by ."(.) ( n -- adr len ) Converts a signed number to a character string(.s ( -- ) Displays the contents of the data stack(;code) ( -- ) Run-time word compiled by ;CODE and DOES>(?do) ( end start -- ) Run-time word compiled by ?DO(abort") ( flag -- ) Run-time word compiled by ABORT"(compile) ( acf -- ) Compiles a compilation address into the dictionary(do) ( end start -- ) Run-time word compiled by DO(does) ( -- ) Run-time word compiled by DOES>(interpret ( -- ) The Default implementation of INTERPRET(is) ( action-acf -- ) Run-time word compiled by IS(lit) ( -- n ) Run-time word compiled by DO-LITERAL(llit) ( -- l ) Run-time word compiled by DO-LITERAL(loop) ( -- ) Run-time word compiled by LOOP(s ( -- ) stack-comment Alternate form of stack comment(see) ( acf -- ) Decompiles the word(u.) ( u -- adr len ) Converts an unsigned number to a character string(where ( -- ) The Default implementation of WHERE* ( n1 n2 -- n3 ) Multiplies n1 times n2+ ( n1 n2 -- n3 ) Adds n1+n2+! ( n adr -- ) Adds n to the number stored at adr+loop ( n -- ) Ends DO .. +LOOP construct; adds n to loop index+str ( adr1 -- adr2 ) Finds the end of the packed string at adr1, ( n -- ) Places a number in the dictionary," ( -- ) ccc" Places a string at the top of the dictionary- ( n1 n2 -- n3 ) Subtracts n1-n2-rot ( n1 n2 n3 --- n3 n1 n2 ) Shuffles top 3 stack items-trailing ( adr +n1 -- adr +n2 ) Removes trailing spaces. ( n -- ) Displays a number." ( -- ) ccc" Compiles a string for later display.( ( -- ) ccc) Displays a string immediately.id ( anf -- ) Displays the name of a word from its name field address.name ( acf -- ) Displays the name of a word from its compilation address.r ( n +n -- ) Displays a number in a fixed width field.s ( -- ) Displays the contents of the data stack/ ( n1 n2 -- n3 ) Divides n1/n2/c ( -- n ) The number of bytes in a byte; 1/c* ( n1 -- n2 ) Multiplies by the size of a byte/l ( -- n ) The number of bytes in a longword; 4 on a 32-bit system/l* ( n1 -- n2 ) Multiply by the size of a longword/link ( -- n ) The number of bytes in a dictionary link; 4 on a 32-bit system/mod ( n1 n2 -- n3 n4 ) n3 is remainder, n4 is quotient of n1/n2/n ( -- n ) The number of bytes in a normal; 4 on a 32-bit system/n* ( n1 -- n2 ) Multiplies by the size of a stack item/token ( -- n ) The number of bytes in a compiled address; 4 on a 32-bit system/w ( -- n ) The number of bytes in a 16-bit word; 2/w* ( n1 -- n2 ) Multiply by the size of a word0< ( n -- flag ) Is n < 0 ?0= ( n -- flag ) Is n = 0 ?0> ( n -- flag ) Is n > 0 ?1+ ( n1 -- n2 ) Add 11- ( n1 -- n2 ) Subtracts 116-bit ( -- ) Noop on a 16-bit system, aborts on a 32-bit system16\ ( -- ) Ignores rest of line if not a 16-bit system2! ( n1 n2 adr -- ) Stores 2 numbers at adr2* ( n1 -- n2 ) Multiplies by 22+ ( n1 -- n2 ) Adds 22- ( n1 -- n2 ) Subtracts 22/ ( n1 -- n2 ) Divides by 22@ ( adr -- n1 n2 ) Fetchs 2 numbers from adr2drop ( n1 n2 -- ) Removes 2 numbers from stack2dup ( n1 n2 -- n1 n2 n1 n2 ) Duplicates 2 numbers32-bit ( -- ) Aborts if the Forth system is a 16-bit implementation32\ ( -- ) Ignores rest of line in a 16-bit system; no-op on a 32-bit system: ( -- sys ) name Starts the compilation of a new colon definition; ( -- ) Finishes the compilation of a colon definition;s ( -- ) Terminates the loading of the current input file< ( n1 n2 -- flag ) Is n1 < n2 ?<# ( -- ) Initializes pictured numeric output<< ( n1 cnt -- n2 ) Left shifts n1 by count places<= ( n1 n2 -- flag ) True if n1 is less than or equal to n2<> ( n1 n2 -- flag ) True if n1 is not equal to n2<mark ( -- adr ) Remembers target of backward branch<resolve ( adr -- ) Finishes a backward branch<w@ ( adr -- n ) Fetchs the signed 16-bit word at addr= ( n1 n2 -- flag ) Is n1 = n2 ?>> ( n1 n2 -- flag ) Is n1 > n2 ?>= ( n1 n2 -- flag ) True if n1 is greater than or equal to n2>> ( n1 cnt -- n2 ) Rights shift n1 by "cnt" places>>a ( n1 cnt -- n2 ) Arithmetic rights shift n1 by "cnt" places (sign bit copied to high bits)>body ( acf -- apf ) Finds the parameter field address from the compilation address>data ( acf -- adr ) Finds the data storage address for the word at acf>in ( -- adr ) Variable containing input stream offset; Implemented in BLOCK.FTH>link ( acf -- alf ) Finds link field address from compilation address>mark ( -- adr ) Remembers the location of forward branch>name ( acf -- anf ) Finds name field address from compilation address>r ( n -- ) Moves a number to the return stack>relbit ( adr -- byte-adr bitmask ) Returns byte address and mask of the relocation bit for the addess "adr">resolve ( adr -- ) Finishes a forward branch>type ( adr +n -- ) Displays characters and stores them at PAD>user ( apf -- user-var-adr ) Finds a user number that is in the parameter field>user# ( acf -- user# ) Finds the user number associated with the word if there is one? ( adr -- ) Displays the contents of a variable?branch ( flag -- ) High-level conditional branch?comp ( -- ) Aborts if not compiling?cr ( -- ) New line if fewer than no space left on this one?csp ( -- ) Checks stack pointer against value saved by !CSP?do ( w1 w2 -- ) Begins a ?DO .. LOOP to be executed 0 or more times?dup ( n -- n n ) Duplicates n if it is non-zero?exec ( -- ) Aborts if not interpreting?leave ( flag -- ) Exits from a DO .. LOOP if flag is nonzero?line ( n -- ) New line if fewer than n spaces left on this one?pairs ( n1 n2 -- ) Aborts if n1 is not equal to n2?stack ( -- ) Aborts if the stack pointer is out of range@ ( adr -- n ) Fetches a number from adrabort ( -- ) Aborts current execution and interprets keyboard commandsabort" ( flag -- ) ccc" Conditional abort with messageabs ( n -- u ) Absolute valuealias ( -- ) new-name existing-name Creates a new name for an existing wordalign ( -- ) Makes sure the dictionary pointer is on a machine word boundaryaligned ( adr1 -- adr2 ) Adjusts an address to a machine word boundaryallot ( n -- ) Allocates space in the dictionaryand ( n1 n2 -- n3 ) Logical andanother? ( -- [ anf ] more? ) Selects next word in vocabularyascii ( -- char ) ccc Numerical value of first ascii character of next wordbase ( -- adr ) Variable containing number basebegin ( -- ) Begins a BEGIN .. WHILE .. REPEAT loopbetween ( n min max -- f ) True if min <= n <= maxbl ( -- n ) The ascii code for the space character; decimal 32blk ( -- adr ) Variable containing input block number; Implemented in BLOCK.FTHbody> ( apf -- acf ) Finds compilation address from parameter field addressbounds ( adr1 len -- adr2 adr1 ) Converts address and length to endadr startadrbranch ( -- ) High-level unconditional branchbwjoin ( b.low b.high -- w ) Joins two bytes to form a 16-bit numberbye ( -- ) Exits from Forthc! ( n -- adr ) Stores a byte at adrc@ ( adr -- n ) Fetches a byte from adrca+ ( adr1 index -- adr2 ) Increments adr1 by index times the size of a byteca1+ ( adr1 -- adr2 ) Increments adr1 by the size of a bytecanonical ( adr -- adr ) Converts a string to lower casecaps ( -- adr ) USER variable controlling upper case/lower case sensitivitycase ( selector -- selector ) Begins a CASE ... ENDCASE conditionalcatch ( acf -- 0|error ) Executes 'acf'. Returns 0 if no THROW occurred, else returns error code.ccall ( args ... format call# -- [ result ] ) Executes user C function "call#", passing args according to "format" stringccall: ( table-entry# -- ) name { arg-spec arg-spec ... -- result-spec } Creates a forth word to execute a user-supplied C functioncmove ( adr1 adr2 u -- ) Copies u bytes from adr1 to adr2cmove> ( adr1 adr2 u -- ) Copies u bytes from adr1 to adr2code ( -- sys ) name Starts the definition of an assembly language wordcompile ( -- ) Compiles next word at run timeconstant ( n -- ) name Defines a constantcontext ( -- adr ) Array of vocabularies to searchcontrol ( -- char ) ccc Control character number of first character of next wordconvert ( +l1 adr1 -- +l2 adr2 ) Converts a string to a numbercount ( adr1 -- adr2 +n ) Unpacks a packed stringcr ( -- ) Terminates a line on the display and goes to the next linecrash ( -- ) Initial action for words defined by DEFERcreate ( -- ) name Generic defining wordcurrent ( -- adr ) Variable containing compilation vocabularydecimal ( -- ) Set number base to 10defer ( -- ) name Defining word for forward references or execution vectorsdefiner ( acf -- definer-acf ) Finds the word which defined the word at acfdefinitions ( -- ) Sets compilation vocabularydelimiter ( -- adr ) USER variable containing the actual delimiter found by WORDdepth ( -- +n ) How many numbers on stack?digit ( char base -- digit true | char false ) Converts a character to a digitdo ( n1 n2 -- ) Begins a DO .. LOOPdo-defined ( cfa immediate? -- ?? ) Called to handle a predefined word during interpreting or compilationdo-literal ( l -- ?? ) Called to handle number during interpreting or compilationdo-undefined ( str -- ) Called to handle an undefined word during interpreting or compilationdoes> ( -- adr ) Starts the run-time clause for defining wordsdpl ( -- adr ) Variable containing the position of the decimal point in last number inputdrop ( n -- ) Removes n from the stackdu ( adr -- adr+64 ) Displays 64 bytes of memory starting at adrdump ( adr len -- ) Displays len bytes of memory starting at adrdup ( n -- n n ) Duplicates n.else ( -- ) Executes the following code if IF failedemit ( char -- ) Displays the characterend-string-array ( -- ) Finishes the definition of a string arrayendcase ( selector -- ) Terminates a CASE ... ENDCASE conditionalendof ( -- ) Terminates an OF ... ENDOF clause within a CASE ... ENDCASE conditionalentry ( -- adr ) USER variable used to implement multitaskingerase ( adr u -- ) Sets u bytes of memory to 0errno ( -- adr ) USER variable containing the last system error codeerror-output ( -- ) Selects the error output streamexecute ( acf -- ) Executes the word whose compilation address is on the stackexit ( -- ) Returns from the current wordexpect ( adr +n -- ) Gets a line of input from the keyboard and stores it at adrfalse ( -- 0 ) The value FALSE, which is 0fclose ( fd -- ) Closes the file whose descriptor is "fd"fcr ( fd -- ) Writes the end-of-line sequence to the file "fd"fexit ( -- ) Ignores the rest of the current input filefflush ( fd -- ) Forces file buffers to be written to the file.fgetc ( fd -- char ) Returns next character from file whose descriptor is "fd", or -1 at end.fgetline ( adr fd -- #bytes ) Reads next line from file "fd" into buf at "adr" as packed string.fgets ( adr maxlen fd -- #bytes-read ) Reads up to "maxlen" characters from file "fd" into buffer at "adr".fill ( adr u byte -- ) Sets u bytes of memory to bytefind ( adr1 -- adr2 n ) Finds a word in the dictionaryfload ( -- ) filename Interprets a filefollow ( threads -- ) Prepares to scan a vocabulary; see ANOTHER?fopen ( string mode -- fd ) Opens the file "string" in mode "mode" (READ, WRITE, MODIFY).forth ( -- ) The main vocabularyforth-83 ( -- ) Asserts the dialectfputc ( char fd -- ) Writes the character "char" to the file whose descriptor is "fd"fputs ( adr len fd -- ) Writes "len" characters from the buffer at "adr" to the file "fd"fseek ( l.position fd -- ) Sets position of file "fd" to the 32-bit number "l.position"fsize ( fd -- l.size ) Returns 32-bit size of the file "fd"ftell ( fd -- l.position ) Returns 32-bit current position within the file "fd"fungetc ( char fd -- ) Puts "char" back on file "fd"; undoes "fgetc"here ( -- adr ) Address of top of dictionaryhex ( -- ) Sets the number base to 16hidden ( -- ) Vocabulary containing words used only to implement other wordshide ( -- ) Makes the most recent word invisiblehold ( char -- ) Inserts the char in the pictured numeric output stringi ( -- n ) Loop indexif ( flag -- ) Executes following code if flag is trueimmediate ( -- ) Marks the last word as immediateimmediate? ( acf -- flag ) True if word is immediateinput-file-name ( -- str ) The name of the file being interpreted.interpret ( -- ) Interprets the input streamis ( action-acf -- ) name Installs a new action in a DEFER wordj ( -- n ) Loop index for next enclosing loopkey ( -- char ) Explicit 32-bit additionl+! ( l adr -- ) Adds l to the 32-bit number at adrl, ( l -- ) Places a longword in the dictionaryl->n ( l -- n ) Converts a longword to a stack item; noop on this systeml. ( l -- ) Displays a 32-bit signed numberl0= ( l -- flag ) True if l is zerol< ( l1 l2 -- flag ) True if l1 is less than l2l= ( l1 l2 -- flag ) True if l1 is equal to l2l>= ( l1 l2 -- flag ) True if l1 is less than l2; explicitly 32-bitl>name ( alf -- anf ) Finds the name field address from link field addressl>r ( l -- ) Moves a longword to the return stackl@ ( adr -- l ) Fetchs the 32-bit longword at adrla+ ( adr1 index -- adr2 ) Increments adr1 by index times the size of a longwordla1+ ( adr1 -- adr2 ) Increments adr1 by the size of a longwordland ( l1 l2 -- l3 ) Explicit 32-bit logical andlast ( -- adr ) USER variable containing the name field address of the last word createdlastacf ( -- acf ) The compilation address of the last word createdlbetween ( l1 lmin lmax -- flag ) True if lmin <= l1 <= lmax; explicitly 32-bitlbsplit ( l -- b.low b.mlow b.mhigh b.high ) Splits a longword into four byteslconstant ( l -- ) name Defines a 32-bit constantldrop ( l -- ) Removes a longword from the stackldup ( l -- l l ) Duplicates lleave ( -- ) Exit from DO .. LOOPlink! ( link adr -- ) Stores a dictionary linklink@ ( lfa -- link ) Fetches a dictionary linkliteral ( -- n ) Compiles a numberliteral? ( str -- str false | n true ) Checks to see if a string is a number during interpreting or compilationlliteral ( -- l ) Compiles an explicit 32-bit numberlmargin ( -- adr ) Variable containg left margin for output formattinglnegate ( l1 -- l2 ) Explicit 32-bit negationlnover ( l1 n -- l1 n l2 ) Copies a longword over a normallnswap ( l n -- n l ) Swaps a longword and a normallong? ( -- flag ) True if the number that was just input contained a decimal pointloop ( -- ) End of DO .. LOOPlose ( -- ) Compiled in place of an undefined word; abortslr> ( -- l ) Moves a longword from the return stacklswap ( l1 l2 -- l2 l1 ) Swap 2 longwordslvariable ( -- ) name Define a 32-bit variablelwithin ( l1 lmin lmax -- flag ) True if lmin <= l1 < lmax; explicitly 32-bitlwsplit ( l -- w.low w.high ) Split a longword into two wordsmax ( n1 n2 -- n3 ) n3 is maximum of n1 and n2maxdp ( -- adr ) The highest address that the dictionary can grow tomaxprimitive ( -- n ) The maximum number of Forth words implemented directly in Cmin ( n1 n2 -- n3 ) n3 is minimum of n1 and n2mod ( n1 n2 -- n3 ) Remainder of n1/n2move ( adr1 adr2 u -- ) Copies u bytes from adr1 to adr2mu/mod ( ul n -- n.rem ul.quot ) Divides longword by normal giving normal remainder and long quotientn->l ( u -- l ) Converts a stack item to a longword; noop on this systemn->w ( n -- w ) Converts a stack item to a wordn>link ( anf -- alf ) Finds link field from name fieldna+ ( adr1 index -- adr2 ) Increments adr1 by index times the size of a stack itemna1+ ( adr1 -- adr2 ) Increments adr1 by the size of a stack itemname->string ( anf -- str ) Converts the name of a Forth word to a packed stringname> ( anf -- acf ) Finds compilation address from name fieldnegate ( n1 -- n2 ) Changes the sign of n1newline ( -- char ) The character which ends a line in a text file.nip ( n1 n2 -- n2 ) Discards the second element from the data stacknlover ( n1 l -- n1 l n2 ) Copies a normal over a longwordnlswap ( n l -- l n ) Swaps a normal and a longwordnoop ( -- ) Does nothingnot ( n1 -- n2 ) One's complementnumber? ( adr -- l flag ) Converts a character string to a 32-bit numbernuser ( -- ) name Defines and allocates space for a User variableof ( selector test-value -- ) Begins an OF ... ENDOF clause within a CASE ... ENDCASE conditionaloff ( adr -- ) Stores false at adron ( adr -- ) Stores true at adror ( n1 n2 -- n3 ) Logical ororigin ( -- adr ) The address of the start of the Forth systemover ( n1 n2 -- n1 n2 n3 ) n3 is a copy of n1.pack ( adr1 len adr2 -- adr2 ) Makes a packed string from adr1 len, placing it at adr2pad ( -- adr ) The address of a scratch area used to temporary storagepick ( n1 -- n2 ) Copies n-th numberplace ( adr1 len adr2 -- ) Makes a packed string from adr1 len, placing it at adr2primitive? ( acf -- flag ) True if acf is a reference to a Forth word implemented directly in Cprintable? ( char -- flag ) True if character is printablequit ( -- ) Interprets keyboard commandsr> ( -- n ) Moves a number from the return stack to the data stackr@ ( -- n ) Copies the top of the return stack to the data stackrepeat ( -- ) Ends a BEGIN .. WHILE .. REPEAT looprestore-output ( -- ) Goes back to the old output stream after ERROR-OUTPUTreveal ( -- ) Makes the most recent word visiblermargin ( -- adr ) Variable containg right margin for output formattingroot ( -- ) The vocabulary selected by ONLYrot ( n1 n2 n3 --- n2 n3 n1 ) Rotates 3 numbersrp! ( adr -- ) Changes the return stack pointerrp0 ( -- adr ) A variable containing the address of the bottom of the return stackrp@ ( -- adr ) The address of the top of the return stacks->l ( n -- l ) Converts a signed stack item to a longword; noop on this systems. ( n -- ) Displays n as a signed numbersave-forth ( filename -- ) Writes the Forth dictionary to a file.see ( -- ) name Decompiles the named wordshift ( n1 n2 -- n3 ) Sets sign of pictured outputskipstr ( -- adr len ) Used to implement words with in-line stringssp! ( adr -- ) Changes the data stack pointersp0 ( -- ADDR ) Variable containing the address of the bottom of the Data Stacksp@ ( -- adr ) The address of the top of the data stackspace ( -- ) Displays a space characterspaces ( +n -- ) Displays n spacesspan ( -- adr ) Variable containing the number of characters read by EXPECTstate ( -- adr ) Variable that is nonzero in compile statestring-array ( -- ) name Begins the definition of a string arrayswap ( n1 n2 -- n2 n1 ) Exchanges the top 2 stack entries.syscall ( args ... format sycall# -- error? ) Executes system call "syscall#", passing args according to "format" stringta+ ( adr1 index -- adr2 ) Increments adr1 by index times the size of a compiled addressta1+ ( adr1 -- adr2 ) Increments adr1 by the size of a compiled addresstd ( -- ? ) Interprets the next word or number in DECIMAL modeth ( -- ? ) Interprets the next word or number in HEX modethen ( -- ) Terminates an IF ... ELSE ... THENthrow ( error -- ) Aborts back to most recent CATCH point. See CATCH.tib ( -- adr ) The address of the Text Input Bufferto-column ( column -- ) Advances the output to the indicated columntoken! ( adr2 adr1 -- ) Stores a relocatable address at adr1token, ( adr -- ) Places a relocatable address in the dictionarytoken@ ( adr1 -- adr2 ) Fetches a relocatable addresstrue ( -- -1 ) The value TRUE , which is -1tuck ( n1 n2 -- n2 n1 n2 ) Copies the top of the stack underneath the second itemtype ( adr +n -- ) Displays n charactersu. ( u -- ) Displays an unsigned numberu.r ( u +n -- ) Prints an unsigned number in fixed width fieldu< ( u1 u2 -- flag ) Unsigned version of < .u<= ( u1 n2 -- flag ) True if u1 is less than or equal to u2u> ( u1 n2 -- flag ) True if u1 is greater than u2u>= ( u1 n2 -- flag ) True if u1 is greater than or equal to u2ualloc ( size -- new-user-number ) Allocates space in the user areaul* ( ul1 ul2 -- lproduct ) Unsigned 32x32 -> 32 multiplyum* ( uw1 uw2 -- ul ) 16 bits times 16 bits unsigned multiplyum/mod ( ul un -- un.rem un.quot ) Divide unsigned 32-bit number by unsigned numberunnest ( -- ) Returns from a colon definitionuntil ( flag -- ) Continues executing a BEGIN .. UNTIL loop until flag is trueup! ( adr -- ) Changes the starting address of the user areaup0 ( -- adr ) User variable containing the starting address of the USER areaup@ ( -- adr ) The starting address of the aser areauser ( offset -- ) name Defines a variable at the given offset in the User areauser-size ( -- n ) The size in bytes of the USER area.variable ( -- ) name Defines a variablevfind ( str voc-ptr -- cfa 1 ) Searches for a word in a single vocabularyvoc-link ( -- adr ) USER variable containing the address of the last vocabulary createdvocabulary ( -- ) name Defines a new vocabularyw! ( w adr -- ) Stores a 16-bit word at adrw, ( w -- ) Places a word in the dictionaryw->l ( uw -- l ) Converts an unsigned 16-bit number to a 32-bit numberw@ ( adr -- w ) Fetches the unsigned word at adrwa+ ( adr1 index -- adr2 ) Increments adr1 by index times the size of a wordwa1+ ( adr1 -- adr2 ) Increments adr1 by the size of a wordwarning ( -- adr ) USER variable controlling "isn't Unique" messageswbsplit ( w -- b.low b.high ) Split a 16-bit number into two byteswhere ( -- ) Prints a message telling where in the input stream you arewhile ( flag -- ) Continues execution of BEGIN .. WHILE .. REPEAT loop while flag is truewhy ( -- ) Tells why the last failing system command failedwithin ( n min max -- f ) True if n <= x < maxwljoin ( w.low w.high -- l ) Joins two words to form a longwordword ( char -- adr ) Collects a char-delimited string from the input streamwords ( -- ) Displays the words in the context vocabularyxor ( n1 n2 -- n3 ) Exclusive or6
7
[ ( -- ) Begins interpreting[""] ( -- ) ccc Collects a word from the input stream and compiles it as a string['] ( -- adr ) Compiles the compilation address of a word[compile] ( -- ) Compiles the next word even if it's immediate\ ( -- ) rest-of-line Skips the rest of the line\c ( -- ) rest-of-line Skips the rest of the line\dtc ( -- ) Does nothing\itc ( -- ) Ignores the rest of the line\needs ( -- ) name rest-of-line Interprets the rest of the line if needed-word is not already defined\t16 ( -- ) Ignores the rest of the line\t32 ( -- ) Does nothing]] ( -- ) Begins compilation8
9
The C Forth 83 Floating Point interface is intended to conform to theForth Vendors Group proposed Forth Floating Point Standard.This implementation has the following characteristics:* Floating point numbers are kept on a separate floating point stack.* The floating point format is whatever the C floating point implementation uses for double precision floating point.Floating point numeric input: Floating point numbers are of the form, for example: +1234.5678E-6 The "E" is mandatory; it allows the Forth number parser to distinguish this as a floating point number. Examples: 1E0 -1.3E-4 The presence of a decimal point is not in itself sufficient to distinguish a number as being floating point. The "E" must be present. Floating point numbers are only recognized if BASE is decimal. Floating point numbers may be both interpreted and compiled in the usual way.Glossary: Words marked "FVG" are specified by the Forth Vendors Group proposed floating point standard.F+ fp1 fp2 -- fp3 FVG Floating-point addition. fp3 is the sum of fp1 and fp2.F- fp1 fp2 -- fp3 FVG Floating-point subtraction. fp3 is the difference fp1 minus fp2.F* fp1 fp2 -- fp3 FVG Floating-point multiplication. fp3 is the product of fp1 and fp2.F/ fp1 fp2 -- fp3 FVG Floating-point division. fp3 is the quotient of fp1 divided by fp2.F** fp1 fp2 -- fp3 FVG Floating-point exponentiation. fp3 is the value of fp1 raised to the power fp2.FCOS fp1 -- fp2 FVG fp2 is the cosine of fp1. Input argument is in radians.FSIN fp1 -- fp2 FVG fp2 is the sine of fp1. Input argument is in radians.FSINCOS fp1 -- fp2 fp3 FVG fp2 is the sine of fp1 and fp3 is the cosine of fp3. Input argument is in radians.FTAN fp1 -- fp2 FVG fp2 is the tangent of r1. The tangent of pi/2 or 3pi/2 radians returns the largest floating point number representable in the implementation's binary format.FALN fp1 -- fp2 FVG The exponential function. fp2 is the value of e raised to the power of fp1.FLN fp1 -- fp2 FVG fp2 is the natural logarithm of fp1.FSQRT fp1 -- fp2 FVG fp2 is the square root of fp1.FLOG fp1 -- fp2 FVG fp2 is the base 10 logarithm of fp1.FATAN fp1 -- fp2 FVG fp2 is the arctangent of fp1. This operator is valid for all floating point numbers. The result is in the range -pi/2 to pi/2 radians.FASIN fp1 -- fp2 FVG fp2 is the arcsine of fp1. Valid for -1 <= fp1 <= 1. The result is in the range -pi/2 to pi/2 radians.FACOS fp1 -- fp2 FVG fp2 is the arccosine of fp1. Valid for -1 <= fp1 <= 1. The result is in the range -pi/2 to pi/2 radians.FSINH fp1 -- fp2 FVG fp2 is the hyperbolic sine of fp1.FCOSH fp1 -- fp2 FVG fp2 is the hyperbolic cosine of fp1.FTANH fp1 -- fp2 FVG fp2 is the hyperbolic tangent of fp1.FVARIABLE -- (compilation) FVG -- addr (execution) A defining word used in the form: FVARIABLE cccc When FVARIABLE executes, it creates the definition cccc with its parameter field uninitialized. When cccc is later executed, the address of the parameter field is left on the stack, so that a F@ or F! operation may access this location.FCONSTANT fp -- (compilation) FVG -- fp (execution) A defining word used in the form: fp FCONSTANT <name> When FCONSTANT executes, it creates the definition so that when <name> is later executed, the floating point number fp is left on the stack.FALOG fp1 -- fp2 FVG fp2 is the result of raising 10 to the fp1 power.F. fp -- FVG Display fp on the currently selected output device in fixed-point form; i.e., the location of the decimal point is adjusted as necessary so that no exponent need be displayed. The number of digits specified by the most recent execution of the word PLACES are printed to the right of the decimal point. A trailing blank follows. For example, 4 PLACES 1.2345E02 F. will display as 123.4500b (where the character "b" denotes an ASCII blank).F.R fp n1 n2 -- FVG Display fp on the currently selected output device in fixed-point form with n1 digits to the right of the decimal place, right justified in a field of width n. Numbers that cannot be represented within the given field width are printed in exponential form. If the current system base is not decimal, an error condition exists. For example, 1.2345E2 4 12 F.R will display as bbbb123.4500 (where the character "b" denotes an ASCII blank). ** Not implemented **F.S -- Print the contents of the floating point stack without affecting its contents. The number on the top of the stack appears on the right-hand side of the line.E. fp -- FVG Display fp in exponential form. The significand contains the maximum number of significant digits allowed by the floating-point data format, and the exponent is explicitly displayed even if it is zero. A trailing blank follows. If the current system base is not decimal, an error condition exists. E.R fp n1 n2 -- FVG Display fp on the currently selected output device in exponential form with n1 digits to the right of the decimal place, right justified in a field of width n. If the current system base is not decimal, an error condition exists. For example, 1.234E0 5 12 E.R will display as bb.12340E-01 (where the character "b" denotes an ASCII blank). ** Not implemented **FLOAT l -- fp FVG Convert a signed long integer into its floating-point equivalent, removing the long integer from the Forth parameter stack and leaving the result on the floating-point stack.INT fp -- l FVG Truncate a floating-point number to a signed long integer (round it toward zero), removing the fp number from the floating-point stack and leaving the result on the Forth parameter stack. Underflow gives a zero result, overflow is an error condition.FIX fp -- l FVG Convert a floating-point number to a signed long integer, rounding towards the nearest integer, removing the fp number from the floating-point stack, and leaving the result on the Forth parameter stack. Underflow gives a zero result, overflow is an error condition.FABS fp1 --fp2 FVG fp2 is the absolute value of the floating-point number fp1 .FNEGATE fp1 -- fp2 FVG fp2 is the negative of the floating-point number fp1 .F! f addr -- FVG Store a floating-point number from the floating-point stack into the address that is on top of the Forth parameter stack. F@ addr -- f FVG Fetch a floating-point number to the top of the floating-point stack from the address that is on top of the Forth parameter stack.FDROP fp -- FVG Discard floating-point number on top of the stack.FSWAP fp1 fp2 -- fp2 fp1 FVG Interchange the two floating-point numbers on top of the stack.FOVER fp1 fp2 -- fp1 fp2 fp1 FVG Copy the second floating-point number on the stack to the top of the stack.FDUP fp -- fp fp FVG Duplicate the floating-point number on top of the stack.FROT fp1 fp2 fp3 -- fp2 fp3 fp1 FVG Rotate the third floating-point number to the top of the stack.FPOP f -- l l Move the fp number on top of the floating-point stack to the top two cells of the parameter stack, without converting it to an integer. fpop just moves the bits, without any sort of format conversion.FPUSH l l -- f Push the top two numbers on the parameter stack to the top cell of the floating-point stack, without converting them to fp. fpop just moves the bits, without any sort of format conversion.F0= fp -- f FVG True if the floating-point number on top of the stack is equal to zero. The fp number is removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F0<> fp -- f True if the floating-point number on top of the stack is not equal to zero. The fp number is removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F0< fp -- f FVG True if the floating-point number on top of the fp stack is less than zero. The fp number is removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F0>= fp -- f True if the floating-point number on top of the fp stack is greater than or equal to zero. The fp number is removed from the floating- point stack, and the flag is left on top of the Forth parameter stack.F0<= fp -- f True if the floating-point number on top of the fp stack is less than or equal to zero. The fp number is removed from the floating- point stack, and the flag is left on top of the Forth parameter stack.F0> fp -- f FVG True if the floating-point number on top of the fp stack is greater than zero. The fp number is removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F< fp1 fp2 -- f FVG True if fp1 is less than fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F> fp1 fp2 -- f FVG True if fp1 is greater than fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F<= fp1 fp2 -- f True if fp1 is less than or equal to fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F>= fp1 fp2 -- f True if fp1 is greater than or equal to fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F= fp1 fp2 -- f FVG True if fp1 is equal to fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.F<> fp1 fp2 -- f True if fp1 is not equal to fp2 . The two floating-point numbers are removed from the floating-point stack, and the flag is left on top of the Forth parameter stack.FMAX fp1 fp2 -- fp3 fp3 is the larger of the 2 floating point numbers fp1 and fp2FMIN fp1 fp2 -- fp3 fp3 is the smaller of the 2 floating point numbers fp1 and fp2FCEIL fp1 -- l l is the smallest integer which is as least as large as the floating point number fp1. fp1 is removed from the floating point stack and the result is left on the parameter stack. FFLOOR fp1 -- l l is the largest integer which is not larger than the floating point number fp1. fp1 is removed from the floating point stack and the result is left on the parameter stack. FP! n -- Store the integer on the parameter stack into the floating-point stack pointer. Used for initialization.FP@ -- addr Fetch the current contents of the floating-point stack pointer to the parameter stack.FDEPTH -- n n is the number of floating point numbers currently on the floating point stack.FP0 -- addr addr is the address of a USER variable which contains the 32-bit address of the of the top of the floating point stack area. The stack grows towards low memory from there. FP0 L@ FP! would empty the floating point stack, but see INITF .FCLEAR -- Clears the floating point stack./F -- n Leaves the size, in bytes, of a floating point number in storage format. In this system, the value is 8.(FLITERAL) -- fp The run-time work compiled by fliteral which takes a floating point number from the executing code stream and leaves it on the floating point stack.FLITERAL fp -- C,I The floating point number is removed from the floating point stack and compiled into the current definition so that when the definition is later executed, that floating point number will be left on the floating point stack.Floating point example:This example prints a table of the values of the sine function at 1/10radian intervals between 0 and two-pi.3.1415926535E0 2E0 f* fconstant 2pi: sine-table ( -- ) 0E0 ( angle ) begin fdup 2pi f< ( angle end? ) while fdup f. fdup fsin f. cr .1E0 f+ ( angle' ) repeat;10
Copyright http://astro.pas.rochester.edu/Forth/forth-words.html#l -- Adapted by Peter Forth August 2018