Do not pass memory to console deo

This commit is contained in:
Devine Lu Linvega 2024-06-30 20:59:18 -08:00
parent f8ec872f63
commit 5571e0a92b
4 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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