ForthVM.Words.Interpreter (ForthVM v0.5.0) View Source
Interpreter words
Link to this section Summary
Functions
end: ( -- ) ( R: -- ) explicit process termination
abort: ( i x -- ) ( R: j x -- ) empty the data stack and perform the function of QUIT, which includes emptying the return stack, without displaying a message.
abort?: ( flag i x -- ) ( R: j x -- ) if flag is truthly empty the data stack and perform the function of QUIT, which includes emptying the return stack, displaying a message.
"(": ( -- ) discard all tokens till ")" is fountd
constant: ( x -- ) create a new costant with name from next token and value from data stack
":": ( -- ) convert all tokens till ";" is found into a new word
debug-disable: ( -- ) set process debug flag to false.
debug-dump-word: ( -- ) prints the definition of the word specified in the next token.
debug-enable: ( -- ) set process debug flag to true.
dictionary: ( -- ) ( -- ) print list of words in dictionary
exit: ( -- ) ( -- ) explicit VM termination
"@": ( name -- ) get value in variable
help: ( -- ) ( -- ) print description of dictionary's word/var/const specified as the next token
"+!": ( x name -- ) increment variable by given value
include: ( -- ) include program file from filename specified in next token.
inspect: ( -- ) prints process contex: tokens, data stack, return stack, dictionary, meta.
"!": ( x name -- ) store value in variable
sleep: ( x -- ) sleep for given milliseconds
variable: ( -- ) create a new variable with name from next token
Link to this section Functions
end: ( -- ) ( R: -- ) explicit process termination
abort: ( i x -- ) ( R: j x -- ) empty the data stack and perform the function of QUIT, which includes emptying the return stack, without displaying a message.
abort?: ( flag i x -- ) ( R: j x -- ) if flag is truthly empty the data stack and perform the function of QUIT, which includes emptying the return stack, displaying a message.
"(": ( -- ) discard all tokens till ")" is fountd
constant: ( x -- ) create a new costant with name from next token and value from data stack
":": ( -- ) convert all tokens till ";" is found into a new word
debug-disable: ( -- ) set process debug flag to false.
debug-dump-word: ( -- ) prints the definition of the word specified in the next token.
debug-enable: ( -- ) set process debug flag to true.
dictionary: ( -- ) ( -- ) print list of words in dictionary
exit: ( -- ) ( -- ) explicit VM termination
"@": ( name -- ) get value in variable
help: ( -- ) ( -- ) print description of dictionary's word/var/const specified as the next token
"+!": ( x name -- ) increment variable by given value
include: ( -- ) include program file from filename specified in next token.
inspect: ( -- ) prints process contex: tokens, data stack, return stack, dictionary, meta.
"!": ( x name -- ) store value in variable
sleep: ( x -- ) sleep for given milliseconds
variable: ( -- ) create a new variable with name from next token