diff --git a/src/devices/console.c b/src/devices/console.c index 4bb848c..f6eb773 100644 --- a/src/devices/console.c +++ b/src/devices/console.c @@ -215,9 +215,10 @@ console_dei(Uint8 addr) } void -console_deo(Uint8 *d, Uint8 port) +console_deo(Uint8 port) { FILE *fd = NULL; + Uint8 *d = &uxn.dev[0x10]; switch(port) { case 0x5: /* Console/dead */ start_fork(d); break; case 0x6: /* Console/exit*/ kill_child(d, 0); break; diff --git a/src/devices/console.h b/src/devices/console.h index 9c22617..36d7c5e 100644 --- a/src/devices/console.h +++ b/src/devices/console.h @@ -17,4 +17,4 @@ WITH REGARD TO THIS SOFTWARE. int console_input(char c, int type); void console_listen(int i, int argc, char **argv); Uint8 console_dei(Uint8 addr); -void console_deo(Uint8 *d, Uint8 port); +void console_deo(Uint8 port); diff --git a/src/uxn11.c b/src/uxn11.c index 15323b0..646ff6c 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -67,7 +67,7 @@ emu_deo(Uint8 addr, Uint8 value) if(p > 0x7 && p < 0xe) screen_palette(&uxn.dev[0x8]); break; - case 0x10: console_deo(&uxn.dev[d], p); break; + case 0x10: console_deo(p); break; case 0x20: screen_deo(p); break; case 0xa0: file_deo(0, &uxn.dev[d], p); break; case 0xb0: file_deo(1, &uxn.dev[d], p); break; diff --git a/src/uxncli.c b/src/uxncli.c index 526e823..80f3640 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -38,7 +38,7 @@ emu_deo(Uint8 addr, Uint8 value) uxn.dev[addr] = value; switch(d) { case 0x00: system_deo(p); break; - case 0x10: console_deo(&uxn.dev[d], p); break; + case 0x10: console_deo(p); break; case 0xa0: file_deo(0, &uxn.dev[d], p); break; case 0xb0: file_deo(1, &uxn.dev[d], p); break; }