ForthVM.Words.Flow (ForthVM v0.5.0) View Source

Flow words

Link to this section Summary

Functions

do: ( end_count count -- ) start loop declaration

begin: ( -- ) start loop declaration

j: ( -- data ) copy data from return stack after LOOP's definition to the data stack

r@: ( -- data )copy the top of the return stack to the data stack

i: ( -- count ) copy the top of a LOOP's return stack to the data stack

loop: ( -- ) keep processing do_tokens till count < end_count, each step incrementing count by 1

r: ( data -- ) move the top of the data stack to the return stack

r>: ( -- data ) move the top of the return stack to the data stack

+loop: ( inc -- ) keep processing do_tokens till count < end_count, incrementing count by top value on the data stack

until: (bool -- ) keep processing untill contition is truthly

Link to this section Functions

Link to this function

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

View Source

do: ( end_count count -- ) start loop declaration

Link to this function

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

View Source

begin: ( -- ) start loop declaration

Link to this function

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

View Source

j: ( -- data ) copy data from return stack after LOOP's definition to the data stack

Link to this function

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

View Source

r@: ( -- data )copy the top of the return stack to the data stack

Link to this function

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

View Source

i: ( -- count ) copy the top of a LOOP's return stack to the data stack

Link to this function

loop(tokens, data_stack, list, dictionary, meta)

View Source

loop: ( -- ) keep processing do_tokens till count < end_count, each step incrementing count by 1

Link to this function

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

View Source

r: ( data -- ) move the top of the data stack to the return stack

Link to this function

move_r_to_d(tokens, data_stack, list, dictionary, meta)

View Source

r>: ( -- data ) move the top of the return stack to the data stack

Link to this function

plus_loop(tokens, list1, list2, dictionary, meta)

View Source

+loop: ( inc -- ) keep processing do_tokens till count < end_count, incrementing count by top value on the data stack

Link to this function

until(tokens, list1, list2, dictionary, meta)

View Source

until: (bool -- ) keep processing untill contition is truthly