(uxncore) Housekeeping
This commit is contained in:
parent
b0ca1dc05e
commit
e89d67b8c1
|
@ -19,8 +19,8 @@ static void
|
|||
system_print(Stack *s)
|
||||
{
|
||||
Uint8 i;
|
||||
for(i = s->ptr - 7; i != (Uint8)(s->ptr + 1); i++)
|
||||
fprintf(stderr, "%02x%c", s->dat[i], i == 2 ? '|' : ' ');
|
||||
for(i = s->ptr - 7; i != (Uint8)(s->ptr); i++)
|
||||
fprintf(stderr, "%02x%c", s->dat[i], i == 1 ? '|' : ' ');
|
||||
fprintf(stderr, "< \n");
|
||||
}
|
||||
|
||||
|
@ -116,23 +116,16 @@ uxn_eval(Uint16 pc)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
console_input(char c, int type)
|
||||
{
|
||||
uxn.dev[0x12] = c, uxn.dev[0x17] = type;
|
||||
uxn_eval(uxn.dev[0x10] << 8 | uxn.dev[0x11]);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
/* test */
|
||||
uxn.ram[0x100] = 0xa0;
|
||||
uxn.ram[0x101] = 0x12;
|
||||
uxn.ram[0x102] = 0x34;
|
||||
if(uxn_eval(0x0100) && (uxn.dev[0x10] << 8 | uxn.dev[0x11])) {
|
||||
while(!uxn.dev[0x0f]) {
|
||||
|
||||
}
|
||||
}
|
||||
uxn.ram[0x103] = 0x01;
|
||||
|
||||
if(uxn_eval(0x0100) && (uxn.dev[0x10] << 8 | uxn.dev[0x11]))
|
||||
while(!uxn.dev[0x0f]) ;
|
||||
return uxn.dev[0x0f] & 0x7f;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue