0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-26 15:53:01 +00:00

Fixed issue with boot

This commit is contained in:
neauoire 2021-02-09 09:05:01 -08:00
parent 220c3676e5
commit 1dbe552f77
2 changed files with 5 additions and 9 deletions

12
cli.c
View file

@ -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;
}

2
uxn.c
View file

@ -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;