Move g_sys to the forth heap.

This commit is contained in:
Brad Nelson
2022-07-10 14:13:51 -07:00
parent ddd878ae20
commit 3b27ff93bb
8 changed files with 118 additions and 112 deletions

View File

@ -37,8 +37,8 @@ static cell_t *forth_run(cell_t *init_rp) {
};
if (!init_rp) {
g_sys.DOCREATE_OP = ADDROF(DOCREATE);
g_sys.builtins = builtins;
g_sys->DOCREATE_OP = ADDROF(DOCREATE);
g_sys->builtins = builtins;
return 0;
}
register cell_t *ip, *rp, *sp, tos, w;

View File

@ -89,6 +89,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmd, int show) {
(void *) 0x8000000, HEAP_SIZE,
MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE);
forth_init(0, 0, heap, HEAP_SIZE, boot, sizeof(boot));
for (;;) { g_sys.rp = forth_run(g_sys.rp); }
for (;;) { g_sys->rp = forth_run(g_sys->rp); }
}