|
pforth
0943e5e71114f286dbb2474d55aabf91df02d104
|
Functions | |
| uint8_t * | data_stack_bottom () |
| uint8_t * | return_stack_bottom () |
| pforth_word_ptr | pforth_word_alloc () |
| void | pforth_word_free (const pforth_word_ptr word) |
| void | pforth_init () |
| void | pforth_deinit () |
| pforth_word_ptr | pforth_word_copy (const pforth_word_ptr dest, const pforth_word_ptr src) |
| void | dump_stack () |
| void | register_native (const char *op, word_function f) |
Variables | |
| uint8_t * | data_stack_top |
| void * | return_stack_top |
| dict_t * | forth_dict |
| static uint8_t * | _data_stack_bottom |
| static uint8_t * | _return_stack_bottom |
| uint8_t* data_stack_bottom | ( | ) |
| void dump_stack | ( | ) |
Debug printer for the whole data stack
| void pforth_deinit | ( | ) |
Free the FORTH machine internal structures.
Deallocate stacks, remove dictionary.
| void pforth_init | ( | ) |
Init the FORTH machine.
Allocate stacks, create dictionary.
| pforth_word_ptr pforth_word_alloc | ( | ) |
Allocate memory for new word
NULL if not enough memory | pforth_word_ptr pforth_word_copy | ( | const pforth_word_ptr | dest, |
| const pforth_word_ptr | src | ||
| ) |
Copy the word from src to dest
The dest must be allocated beforehand.
| src | source word |
| dest | destination buffer |
dest) NULL if not enough memory | void pforth_word_free | ( | const pforth_word_ptr | word | ) |
Free the word structure
| word | the word to free |
| void register_native | ( | const char * | op, |
| word_function | f | ||
| ) |
Register native (compile-time) word
| op | The FORTH word to add |
| f | Function to call |
| uint8_t* return_stack_bottom | ( | ) |
|
static |
The global data stack bottom
|
static |
The global return stack bottom
| uint8_t* data_stack_top |
The global data stack top pointer for the FORTH machine
| dict_t* forth_dict |
Storage for the FORTH words
| void* return_stack_top |