refactor: make interpreter portable with static pools and I/O hooks
Co-authored-by: aider (openrouter/moonshotai/kimi-k2.6) <aider@aider.chat>
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
#include "forth.h"
|
||||
|
||||
int main(void) {
|
||||
// Allocate user memory
|
||||
user_mem_size = 1024 * 1024; // 1 Mega cells
|
||||
user_mem = calloc((size_t)user_mem_size, sizeof(Cell));
|
||||
if (!user_mem) {
|
||||
fprintf(stderr, "Failed to allocate user memory\n");
|
||||
return 1;
|
||||
}
|
||||
here = user_mem;
|
||||
|
||||
// Hidden words first
|
||||
|
||||
Reference in New Issue
Block a user