commit 1dbe552f7771e22dd831fd42844ad9b2e9efa56d
parent 220c3676e5e73e13a0e2aafaea06f873d8a12d2b
Author: neauoire <aliceffekt@gmail.com>
Date: Tue, 9 Feb 2021 09:05:01 -0800
Fixed issue with boot
Diffstat:
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/cli.c b/cli.c
@@ -72,28 +72,24 @@ echof(Uxn *c)
getflag(&c->status, FLAG_COND) != 0);
}
-Uxn u;
-
int
main(int argc, char **argv)
{
+ Uxn u;
if(argc < 2)
return error("Input", "Missing");
if(!bootuxn(&u))
return error("Boot", "Failed");
if(!loaduxn(&u, argv[1]))
return error("Load", "Failed");
-
portuxn(&u, 0xfff0, 0xfff1, console_onread, console_onwrite);
-
- printf("VRESET\n");
evaluxn(&u, u.vreset);
- printf("VFRAME\n");
evaluxn(&u, u.vframe);
-
+
+/*
echos(&u.wst, 0x40, "stack");
echom(&u.ram, 0x40, "ram");
echof(&u);
-
+*/
return 0;
}
diff --git a/uxn.c b/uxn.c
@@ -170,7 +170,7 @@ int
bootuxn(Uxn *u)
{
size_t i;
- char *cptr = (char *)u;
+ char *cptr = (char *)&u;
for(i = 0; i < sizeof u; i++)
cptr[i] = 0;
return 1;