eForth1  v2.6
EfVM Namespace Reference

Functions

void _init ()
 
void _qrx ()
 

( – c ) fetch a char from console

More...
 
void _txsto ()
 

(c – ) send a char to console

More...
 
void _out (U16 p, U16 v)
 

Arduino port setting

More...
 
U8 BGET (U16 d)
 
U16 GET (U16 d)
 
void SET (U16 d, U16 v)
 

Function Documentation

◆ _init()

void EfVM::_init ( )

Forth Virtual Machine primitive functions

VM initializer

  • reset interrupt handlers

setup control variables

FORTH_UVAR_ADDR; 'TIB console input buffer pointer BASE current radix for numeric ops CP, top of dictionary, same as HERE CONTEXT name field of last word LAST, same as CONTEXT 'MODE eval mode (interpreter or compiler) 'ABORT exception rescue handler (QUIT) tmp storage (alternative to return stack)

setup Forth user variables

  • set 'TIB pointer
  • set BASE to 10
  • top of dictionary

display init prompt

◆ _qrx()

void EfVM::_qrx ( )
inline

( – c ) fetch a char from console

console IO functions

fetch from IO stream

◆ _txsto()

void EfVM::_txsto ( )
inline

(c – ) send a char to console

◆ _out()

void EfVM::_out ( U16  p,
U16  v 
)
inline

Arduino port setting

  • mask out RX,TX

◆ BGET()

U8 EfVM::BGET ( U16  d)

byte (8-bit) fetch from either RAM or ROM depends on filtered range

◆ GET()

U16 EfVM::GET ( U16  d)

word (16-bit) fetch from either RAM or ROM depends on filtered range

◆ SET()

void EfVM::SET ( U16  d,
U16  v 
)

Variable Documentation

◆ S

DU* EfVM::S

data stack pointer, 'stack' in Dr. Ting's

◆ T

DU EfVM::T

TOS, cached top of stack value.

◆ I

DU EfVM::I

RTOS, cached loop counter on return stack.

◆ io

Stream * EfVM::io

IO Stream, tied to Serial usually.

Stream IO interface.

◆ _rom

PGM_P EfVM::_rom

ROM, Forth built-in words stored in Flash.

ROM, Forth word stored in Arduino Flash Memory.

◆ _ram

U8 * EfVM::_ram

RAM, for user defined words.

RAM, memory block for user define dictionary.

◆ _pre

U8* EfVM::_pre

Forth code pre-defined/embedded in .ino.

◆ _api

CFP EfVM::_api[CFUNC_MAX]

C API function pointer.