|
nanoFORTH
v2.2
|
Functions | |
| void | _nest (IU xt) |
| void | _init () |
| void | _dump (IU p0, U16 sz0) |
| void | _immediate (U16 op) |
| void | _clock () |
| void | _dplus () |
| void | _dminus () |
| void | _dneg () |
| IU | _invoke (U8 op, IU xt=0) |
| void | setup (const char *code, Stream &io, U8 ucase) |
| void | push (int v) |
| int | pop () |
| void | serv_isr () |
| interrupt service routine More... | |
| void | outer () |
| outer-interpreter More... | |
nanoForth Virtual Machine class
| void N4VM::_nest | ( | IU | xt | ) |
reset virtual machine
opcode execution unit i.e. inner interpreter
walk through instruction sequences
< fetch instruction
< masked opcode
branching opcodes?
primitive word?
handle number (1-byte literal)
walk through instruction sequences
< fetch instruction
< masked opcode
branching opcodes?
primitive word?
handle number (1-byte literal)
| void N4VM::_init | ( | ) |
| void N4VM::_immediate | ( | U16 | op | ) |
immediate word handler
compiler
interrupt handlers
< tmp = ISR slot#
system
dicionary debugging
numeric radix
| void N4VM::_clock | ( | ) |
| void N4VM::_dplus | ( | ) |
| void N4VM::_dminus | ( | ) |
| void N4VM::_dneg | ( | ) |
invoke a built-in opcode Note: computed goto takes extra 128-bytes for ~5% faster
stack ops
Bit-wise ops
ALU ops
Logical ops
IO ops
Compiler ops
Double ops
Arduino Specific ops
meta programming (for advance users)
| void N4VM::setup | ( | const char * | code, |
| Stream & | io, | ||
| U8 | ucase | ||
| ) |
constructor and initializer
| code | preload Forth code |
| io | IO stream |
| ucase | case sensitiveness |
| void N4VM::push | ( | int | v | ) |
VM proxy functions
| int N4VM::pop | ( | ) |
| void N4VM::serv_isr | ( | ) |
interrupt service routine
virtual machine interrupt service routine
| void N4VM::outer | ( | ) |
outer-interpreter
virtual machine execute single step (outer interpreter)
console ok prompt if tib is empty
get a token from console
parse action from token (keep opcode in tmp)
immediate words,
execute colon word (user defined)
execute primitive built-in word,
push a number (literal) to stack top,
extended words, not implemented yet
or, error (unknown action)