commit ee6b039bba5fabb1c115c31f808a9884bc297cf3
parent 992aa1269176f1986f85feedb20653709eb41b75
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Fri, 10 Mar 2023 16:28:39 -0500
hal: fix broken "entry"
Diffstat:
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/fs/tests/all.fs b/fs/tests/all.fs
@@ -2,7 +2,7 @@
f<< /tests/kernel.fs
f<< /tests/lib/all.fs
\ f<< /tests/sys/all.fs
-\ f<< /tests/fs/all.fs
+f<< /tests/fs/all.fs
f<< /tests/asm/all.fs
\ f<< /tests/comp/c/all.fs
\ f<< /tests/ar/all.fs
diff --git a/fs/tests/lib/all.fs b/fs/tests/lib/all.fs
@@ -5,7 +5,7 @@ f<< /tests/lib/str.fs
f<< /tests/lib/ll.fs
f<< /tests/lib/struct.fs
f<< /tests/lib/meta.fs
-\ f<< /tests/lib/context.fs
+f<< /tests/lib/context.fs
f<< /tests/lib/arena.fs
f<< /tests/lib/malloc.fs
f<< /tests/lib/array.fs
diff --git a/posix/vm.c b/posix/vm.c
@@ -150,13 +150,13 @@ static void _entry(dword dict, byte *name, byte slen) {
memcpy(&vm.mem[here()], name, slen);
allot(slen);
dwrite(gd(NEXTMETA));
- dwrite(dict);
+ dwrite(gd(dict));
cwrite(slen);
- sd(SYSDICT, here()-5);
+ sd(dict, here()-5);
sd(NEXTMETA, 0);
}
static void entry(char *name) {
- _entry(sysdict(), (byte*)name, strlen(name));
+ _entry(SYSDICT, (byte*)name, strlen(name));
}
/* Operations */
@@ -397,7 +397,7 @@ static void ENTRY() {
_entry(dict, &vm.mem[s], len);
sd(_RCNT_, 0);
}
-static void CODE() { ppush(sysdict()); WORD(); ENTRY(); }
+static void CODE() { ppush(SYSDICT); WORD(); ENTRY(); }
static void addmeta(dword id) {
dword a = gd(sysdict()-4);
sd(sysdict()-4, here());
@@ -435,8 +435,9 @@ static void _stackdump(dword a, dword top) {
while (a < top) { printf("%08x ", gd(a)); a += 4; } printf("\n");
}
static void DBG() {
- printf("W %08x A %08x PC %08x PSP %08x RSP %08x MOD %08x\n", vm.W, vm.A, vm.PC, vm.PSP, vm.RSP, gd(MOD));
- printf("PS "); _stackdump(vm.PSP, PSTOP);
+ printf("W %08x A %08x PC %08x PSP %08x RSP %08x MOD %08x HERE %08x\n",
+ vm.W, vm.A, vm.PC, vm.PSP, vm.RSP, gd(MOD), gd(HERE));
+ printf("PS "); _stackdump(vm.PSP, PSTOP-4);
printf("RS "); _stackdump(vm.RSP, RSTOP);
}
static void USLEEP() { usleep(ppop()); }