Arduino-FVM
Byte Token Threaded Forth Virtual Machine (FVM) for Arduino
FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX > Struct Template Reference

#include <FVM.h>

Inheritance diagram for FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >:
Inheritance graph
Collaboration diagram for FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >:
Collaboration graph

Public Member Functions

 Task (Stream &ios, code_P fn=0)
 
void push (cell_t value)
 
cell_t pop ()
 
int depth ()
 
bool trace ()
 
void trace (bool flag)
 
task_tcall (code_P fn)
 

Public Attributes

cell_t m_params [PARAMETER_STACK_MAX]
 
code_P m_returns [RETURN_STACK_MAX]
 
Stream & m_ios
 Input/Output stream. More...
 
cell_t m_base
 Number conversion base. More...
 
bool m_trace
 Trace mode. More...
 
code_Pm_rp
 Return stack pointer. More...
 
code_Pm_rp0
 Return stack bottom pointer. More...
 
cell_tm_sp
 Parameter stack pointer. More...
 
cell_tm_sp0
 Parameter stack bottom pointer. More...
 

Detailed Description

template<int PARAMETER_STACK_MAX, int RETURN_STACK_MAX>
struct FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >

Definition at line 339 of file FVM.h.

Constructor & Destructor Documentation

template<int PARAMETER_STACK_MAX, int RETURN_STACK_MAX>
FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >::Task ( Stream &  ios,
code_P  fn = 0 
)
inline

Construct task with given in-/output stream and threaded code pointer.

Parameters
[in]iosin-/output stream.
[in]fnthreaded code pointer (default none).

Definition at line 349 of file FVM.h.

Member Function Documentation

task_t& FVM::task_t::call ( code_P  fn)
inlineinherited

Set task instruction pointer to given threaded code pointer.

Parameters
[in]fnthreaded code pointer.
Returns
task reference.

Definition at line 331 of file FVM.h.

int FVM::task_t::depth ( )
inlineinherited

Parameter stack depth.

Returns
depth.

Definition at line 303 of file FVM.h.

cell_t FVM::task_t::pop ( )
inlineinherited

Pop value from parameter stack.

Returns
value poped.

Definition at line 294 of file FVM.h.

void FVM::task_t::push ( cell_t  value)
inlineinherited

Push value to parameter stack.

Parameters
[in]valueto push.

Definition at line 285 of file FVM.h.

bool FVM::task_t::trace ( )
inlineinherited

Get trace mode.

Returns
trace mode.

Definition at line 312 of file FVM.h.

void FVM::task_t::trace ( bool  flag)
inlineinherited

Set trace mode.

Parameters
[in]flagtrace mode.

Definition at line 321 of file FVM.h.

Member Data Documentation

cell_t FVM::task_t::m_base
inherited

Number conversion base.

Definition at line 253 of file FVM.h.

Stream& FVM::task_t::m_ios
inherited

Input/Output stream.

Definition at line 252 of file FVM.h.

template<int PARAMETER_STACK_MAX, int RETURN_STACK_MAX>
cell_t FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >::m_params[PARAMETER_STACK_MAX]

Definition at line 340 of file FVM.h.

template<int PARAMETER_STACK_MAX, int RETURN_STACK_MAX>
code_P FVM::Task< PARAMETER_STACK_MAX, RETURN_STACK_MAX >::m_returns[RETURN_STACK_MAX]

Definition at line 341 of file FVM.h.

code_P* FVM::task_t::m_rp
inherited

Return stack pointer.

Definition at line 255 of file FVM.h.

code_P* FVM::task_t::m_rp0
inherited

Return stack bottom pointer.

Definition at line 256 of file FVM.h.

cell_t* FVM::task_t::m_sp
inherited

Parameter stack pointer.

Definition at line 257 of file FVM.h.

cell_t* FVM::task_t::m_sp0
inherited

Parameter stack bottom pointer.

Definition at line 258 of file FVM.h.

bool FVM::task_t::m_trace
inherited

Trace mode.

Definition at line 254 of file FVM.h.


The documentation for this struct was generated from the following file: