<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


Words in category Compilation Words in glossary TurboForth Kernal

Search:
The following words are listed in this category (29 words found): Word Types: S = Standard, I = Immediate , IC = Immediate-compiling.
Word Name Word Type Data Stack Signature Return Stack Signature Description Availability
V1.0 V1.1 V1.2
' (tick) S -- xt -- Returns the XT/CFA of the word immediately following.
, (comma) S n -- -- Compiles the 16 bit cell n on the stack to HERE.
: (colon) SC -- -- Calls HEADER to build a dictionary entry and begins compilation of a colon definition (sets STATE to 1).
; (semi-colon) IC -- -- Ends compilation of the current colon definition.
;CODE IC -- -- Terminates the definition of a machine code word.
[ I -- -- Temporarily suspends compilation (sets STATE to 0) and begins interpreting input as immediate mode input.
['] I -- xt -- Compiles the word following ['] as a literal.
[COMPILE] IC -- -- Compiles the XT/CFA of the word immediately following it to the current colon definition at address HERE.
] I -- -- Ends interpretation mode and resumes normal compilation. See [.
+TO IC value -- -- Adds value to the value in the VALUE immediately following it.
ALIGN SC -- -- Aligns H to the next (highest) even compilation address. Takes no action if H is already even.
ALLOT SC n -- -- Allots n bytes by advancing HERE by n bytes.
C, SC n -- -- Compiles the lower 8 bits of the cell n on the stack to HERE. Advances HERE by 1 byte.
CODE: SC -- -- Begins compilation of a machine code/assembly language word.
COMPILE SC -- -- Compiles the XT/CFA of the word immediately following it to the current colon definition at address HERE.
CONSTANT I n -- -- Creates a CONSTANT with the value n.
CREATE SC -- -- Reads forward in the terminal input buffer and creates a word in the dictionary whose run-time behaviour is to return the body address of the newly created word.
DOES> IC -- -- Links a run-time action to a word created with CREATE.
EXECUTE S xt -- -- Executes the word whose XT/CFA is on the stack.
HEADER S address length -- -- Creates a dictionary entry with the name of the string nominated at address and length.
HEADER (V1.2.1) S -- -- This description pertains to HEADER in TurboForth Version 1.2.1 only. HEADER searches forward in the input buffer for the next available word and creates and links a new dictionary entry accordingly.
HIDDEN S da -- -- Toggles the hidden bit on/off in the last created dictionary entry pointed to by dictionary address da.
IMMEDIATE S -- -- Toggles the immediate bit on/off in the last created word.
LIT S -- n -- At execution time, places the value in the cell immediately following the LIT instruction onto the data stack.
LITERAL IC n -- -- Compiles LIT n to the current definition. n is a 16-bit cell.
RECURSE IC -- -- Causes a recursive jump to the beginning of the word being defined.
TO IC n -- -- Used with a VALUE. Replaces the value of the named VALUE with n.
VALUE IC n -- -- Defines a VALUE using the name immediately following in the terminal input buffer with the value n.
VARIABLE IC -- -- Creates a variable using the name immediately following in the terminal input buffer.

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>