From 2a1a506524916fc04ec5cee5124796b2e21fce9d Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 13 Jun 2022 12:20:20 -0700 Subject: [PATCH] F2 should display the stacks even if empty --- src/devices/system.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/devices/system.c b/src/devices/system.c index c6f44ba..47ad156 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -23,7 +23,6 @@ static void system_print(Stack *s, char *name) { Uint8 i; - fprintf(stderr, "<%s>", name); for(i = 0; i < s->ptr; i++) fprintf(stderr, " %02x", s->dat[i]); @@ -35,10 +34,8 @@ system_print(Stack *s, char *name) void system_inspect(Uxn *u) { - if(u->wst->ptr) - system_print(u->wst, "wst"); - if(u->rst->ptr) - system_print(u->rst, "rst"); + system_print(u->wst, "wst"); + system_print(u->rst, "rst"); } int @@ -66,6 +63,6 @@ system_deo(Uxn *u, Uint8 *d, Uint8 port) switch(port) { case 0x2: u->wst = (Stack *)(u->ram + (d[port] ? (d[port] * 0x100) : 0x10000)); break; case 0x3: u->rst = (Stack *)(u->ram + (d[port] ? (d[port] * 0x100) : 0x10100)); break; - case 0xe: system_inspect(u); break; + case 0xe: if(u->wst->ptr || u->rst->ptr) system_inspect(u); break; } }