|
nanoFORTH
v2.2
|
Functions | |
| void | set_pre (const char *code) |
| set embedded Forth code More... | |
| char | uc (char c) |
| void | mstat () |
| display MMU statistics More... | |
| char | vkey () |
| void | _console_input () |
| void | set_io (Stream *s) |
| initialize or redirect IO stream More... | |
| void | set_hex (U8 f) |
| enable/disable hex numeric radix More... | |
| void | set_ucase (U8 uc) |
| set case sensitiveness More... | |
| void N4Core::set_pre | ( | const char * | code | ) |
set embedded Forth code
| char N4Core::uc | ( | char | c | ) |
< upper case for case-insensitive matching
| void N4Core::mstat | ( | ) |
display MMU statistics
show system memory allocation info
dictionary size
stack size
terminal input buf
| char N4Core::key | ( | ) |
Arduino's Serial.getchar(), yield to user tasks when waiting.
char IO from console i.e. RX/TX
| void N4Core::d_chr | ( | char | c | ) |
print a char to console
| void N4Core::d_adr | ( | IU | a | ) |
print a 12-bit address
| void N4Core::d_ptr | ( | U8 * | p | ) |
print a pointer
| void N4Core::d_num | ( | DU | n | ) |
sent a number literal to console
| void N4Core::d_str | ( | U8 * | p | ) |
handle dot string (byte-stream leading with length)
| void N4Core::d_nib | ( | U8 | n | ) |
print a nibble
| void N4Core::d_u8 | ( | U8 | c | ) |
print a 8-bit hex number
dump byte-stream between pointers with delimiter option
| base | display memory block reference memory pointer (start of dictionary) |
| p0 | starting memory pointer |
| sz | number of bytes to print |
| delim | delimiter, ' ' for space, 0 for none |
| void N4Core::d_name | ( | U8 * | p | ) |
print 3 characters name
display the opcode name
| op | display opcode & 3-char name opcode |
| lst | nanoForth string formatted list |
| space | delimiter to append at the end |
parse a literal from string
| tkn | process a literal from string given token string of a number |
| num | number pointer for return value |
| void N4Core::clear_tib | ( | ) |
| char N4Core::vkey | ( | ) |
fill input buffer from console char-by-char til CR or LF hit
capture preload Forth code
feed key() after preload exhausted
| void N4Core::_console_input | ( | ) |
| U8 N4Core::ok | ( | ) |
check whether input buffer is empty
display OK prompt if input buffer is empty
console prompt with stack dump
get a token from console input
capture a token from console input buffer
token pointer to input buffer
dot_string flag
read from console (with trailing blank)
skip leading spaces
find the end of comment
skip trailing spaces
search keyword in a nanoForth name field list
scan token from a given string list
| tkn | find token in given string list token to be searched |
| lst | string list to be scanned |
| id | resultant index if found |
| void N4Core::set_io | ( | Stream * | s | ) |
initialize or redirect IO stream
| void N4Core::set_hex | ( | U8 | f | ) |
enable/disable hex numeric radix
| void N4Core::set_ucase | ( | U8 | uc | ) |
set case sensitiveness
| U8 N4Core::dic |
base of dictionary
| N4Task N4Core::vm { NULL, NULL } |
VM context.
VM state.
| Stream * N4Core::io { &Serial } |
default to Arduino Serial Monitor
| U8 N4Core::trc { 0 } |
tracing control flag
tracing flag
| char* N4Core::_pre { NULL } |
preload Forth code
| U8 N4Core::_empty { 1 } |
empty flag for terminal input buffer
| U8 N4Core::_hex { 0 } |
numeric radix for display
| U8 N4Core::_ucase { 0 } |
empty flag for terminal input buffer