Arduino-FVM
Byte Token Threaded Forth Virtual Machine (FVM) for Arduino
FVM::task_t Struct Reference

#include <FVM.h>

Inheritance diagram for FVM::task_t:
Inheritance graph
Collaboration diagram for FVM::task_t:
Collaboration graph

Public Member Functions

 task_t (Stream &ios, cell_t *sp0, code_P *rp0, code_P fn)
 
void push (cell_t value)
 
cell_t pop ()
 
int depth ()
 
bool trace ()
 
void trace (bool flag)
 
task_tcall (code_P fn)
 

Public Attributes

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

Definition at line 251 of file FVM.h.

Constructor & Destructor Documentation

FVM::task_t::task_t ( Stream &  ios,
cell_t sp0,
code_P rp0,
code_P  fn 
)
inline

Construct task with given in-/output stream, stacks and threaded code pointer. Default number conversion base is 10, and trace disabled.

Parameters
[in]iosin-/output stream.
[in]sp0bottom of parameter stack.
[in]rp0bottom of return stack.
[in]fnthreaded code pointer.

Definition at line 269 of file FVM.h.

Member Function Documentation

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

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 ( )
inline

Parameter stack depth.

Returns
depth.

Definition at line 303 of file FVM.h.

cell_t FVM::task_t::pop ( )
inline

Pop value from parameter stack.

Returns
value poped.

Definition at line 294 of file FVM.h.

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

Push value to parameter stack.

Parameters
[in]valueto push.

Definition at line 285 of file FVM.h.

bool FVM::task_t::trace ( )
inline

Get trace mode.

Returns
trace mode.

Definition at line 312 of file FVM.h.

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

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

Number conversion base.

Definition at line 253 of file FVM.h.

Stream& FVM::task_t::m_ios

Input/Output stream.

Definition at line 252 of file FVM.h.

code_P* FVM::task_t::m_rp

Return stack pointer.

Definition at line 255 of file FVM.h.

code_P* FVM::task_t::m_rp0

Return stack bottom pointer.

Definition at line 256 of file FVM.h.

cell_t* FVM::task_t::m_sp

Parameter stack pointer.

Definition at line 257 of file FVM.h.

cell_t* FVM::task_t::m_sp0

Parameter stack bottom pointer.

Definition at line 258 of file FVM.h.

bool FVM::task_t::m_trace

Trace mode.

Definition at line 254 of file FVM.h.


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