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

Link to this function

_end(tokens, data_stack, return_stack, dictionary, meta)

View Source

end: ( -- ) ( R: -- ) explicit process termination

Link to this function

abort(tokens, data_stack, return_stack, dictionary, meta)

View Source

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.

Link to this function

abort_msg(list1, list2, return_stack, dictionary, meta)

View Source

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.

Link to this function

comment(tokens, data_stack, return_stack, dictionary, meta)

View Source

"(": ( -- ) discard all tokens till ")" is fountd

Link to this function

constant(list1, list2, return_stack, dictionary, meta)

View Source

constant: ( x -- ) create a new costant with name from next token and value from data stack

Link to this function

create(list, data_stack, return_stack, dictionary, meta)

View Source

":": ( -- ) convert all tokens till ";" is found into a new word

Link to this function

debug_disable(tokens, data_stack, return_stack, dictionary, meta)

View Source

debug-disable: ( -- ) set process debug flag to false.

Link to this function

debug_dump_word(list, data_stack, return_stack, dictionary, meta)

View Source

debug-dump-word: ( -- ) prints the definition of the word specified in the next token.

Link to this function

debug_enable(tokens, data_stack, return_stack, dictionary, meta)

View Source

debug-enable: ( -- ) set process debug flag to true.

Link to this function

dictionary(tokens, data_stack, return_stack, dictionary, meta)

View Source

dictionary: ( -- ) ( -- ) print list of words in dictionary

Link to this function

exit(tokens, data_stack, return_stack, dictionary, meta)

View Source

exit: ( -- ) ( -- ) explicit VM termination

Link to this function

get_variable(tokens, list, return_stack, dictionary, meta)

View Source

"@": ( name -- ) get value in variable

Link to this function

help(list, data_stack, return_stack, dictionary, meta)

View Source

help: ( -- ) ( -- ) print description of dictionary's word/var/const specified as the next token

Link to this function

inc_variable(tokens, list, return_stack, dictionary, meta)

View Source

"+!": ( x name -- ) increment variable by given value

Link to this function

include(list, data_stack, return_stack, dictionary, meta)

View Source

include: ( -- ) include program file from filename specified in next token.

Link to this function

inspec(tokens, data_stack, return_stack, dictionary, meta)

View Source

inspect: ( -- ) prints process contex: tokens, data stack, return stack, dictionary, meta.

Link to this function

set_variable(tokens, list, return_stack, dictionary, meta)

View Source

"!": ( x name -- ) store value in variable

Link to this function

sleep(tokens, list, return_stack, dictionary, meta)

View Source

sleep: ( x -- ) sleep for given milliseconds

Link to this function

variable(list, data_stack, return_stack, dictionary, meta)

View Source

variable: ( -- ) create a new variable with name from next token