nanoFORTH
v2.2
|
nanoForth main controller More...
#include <Arduino.h>
Go to the source code of this file.
Data Structures | |
class | NanoForth |
Macros | |
#define | APP_NAME "\nnanoForth 2.2 " |
#define | N4_API_SZ 8 |
#define | TRC_LEVEL 1 |
Arduino Console Output Support | |
#define | log(msg) Serial.print(F(msg)) |
#define | logx(v) Serial.print((U16)v, HEX) |
#define | INLINE inline __attribute__((always_inline)) |
Typedefs | |
typedef U16 | IU |
16-bit instruction unit (ADDR) More... | |
typedef S16 | DU |
16-bit data unit (CELL) More... | |
typedef S32 | DU2 |
Portable Types | |
typedef uint8_t | U8 |
8-bit unsigned integer, for char and short int More... | |
typedef uint16_t | U16 |
16-bit unsigned integer, for return stack, and pointers More... | |
typedef int16_t | S16 |
16-bit signed integer, for general numbers More... | |
typedef uint32_t | U32 |
32-bit unsigned integer, for millis() More... | |
typedef int32_t | S32 |
32-bit signed integer More... | |
typedef void(* | FPTR) () |
function pointer More... | |
nanoForth main controller
paddr | forth | objects | rom |
---|---|---|---|
0x0000 | Interrupt Vectors | ||
0x0100 | Arduino libraries | ||
0x02c0 | 0x0000 | Dictionary==> | x |
...1K-byte... | x | ||
0x06c0 | 0x0400 | Return Stack==> | |
...64 entries... | |||
<==Data Stack | |||
0x0740 | 0x0480 | Input Buffer | |
...free memory... | |||
Arduino heap | |||
0x0900 |
#define APP_NAME "\nnanoForth 2.2 " |
#define N4_API_SZ 8 |
@Note 1: N4_API_SZ defines C funcion pointer slots which take 2 bytes each The number can be increased if more interfaces are needed @Note 2: TRC_LEVEL set tracing level 0 - no tracing, N4Asm::see, N4Asm::trace, and N4VM::_dump 1 - detailed tracing info of the above 2 - add execution tracing, N4VM::_nest (slower) The above codes takes extra 1.8K bytes which can be disabled if extra program memory is needed C API func ptr slots
#define TRC_LEVEL 1 |
SEE and tracing level
#define log | ( | msg | ) | Serial.print(F(msg)) |
#define logx | ( | v | ) | Serial.print((U16)v, HEX) |
#define INLINE inline __attribute__((always_inline)) |
typedef uint8_t U8 |
8-bit unsigned integer, for char and short int
typedef uint16_t U16 |
16-bit unsigned integer, for return stack, and pointers
typedef int16_t S16 |
16-bit signed integer, for general numbers
typedef uint32_t U32 |
32-bit unsigned integer, for millis()
typedef int32_t S32 |
32-bit signed integer
typedef void(* FPTR) () |
function pointer
16-bit instruction unit (ADDR)
nanoForth main control object (with static members that support multi-threading)