uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 210be1f458ed051f37dea898a751b1ebbf125748
parent 95aa3dba35605b452a01e36d7a785b5ec2ae7129
Author: neauoire <aliceffekt@gmail.com>
Date:   Mon, 28 Jun 2021 10:07:49 -0700

Added console changes to uxncli

Diffstat:
Msrc/uxncli.c | 12++----------
1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/uxncli.c b/src/uxncli.c @@ -45,16 +45,8 @@ printstack(Stack *s) void console_talk(Device *d, Uint8 b0, Uint8 w) { - char buffer[7], *p = buffer; - int len = 0; - if(!w) return; - switch(b0) { - case 0x8: len = 1, p = (char *)&d->dat[0x8]; break; - case 0x9: len = sprintf(p, "0x%02x", d->dat[0x9]); break; - case 0xb: len = sprintf(p, "0x%04x", mempeek16(d->dat, 0xa)); break; - case 0xd: len = strlen(p = (char *)&d->mem[mempeek16(d->dat, 0xc)]); break; - } - if(len) write(1, p, len); + if(w && b0 == 0x8) + write(1, (char *)&d->dat[0x8], 1); } void