uxn

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

commit d3371d1f739e71553006b6c5607372b67515fe8c
parent 13bd3ce2d8c81c31a7b54693b6f1b6734c9bd6ec
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed, 16 Aug 2023 13:53:31 -0700

Muted warnings

Diffstat:
Msrc/devices/system.c | 6++++--
Msrc/uxn.c | 2+-
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/devices/system.c b/src/devices/system.c @@ -114,10 +114,12 @@ system_init(Uxn *u, Uint8 *ram, char *rom) void system_deo(Uxn *u, Uint8 *d, Uint8 port) { + Uint8 *ram; + Uint16 addr; switch(port) { case 0x3: - Uint8 *ram = u->ram; - Uint16 addr = PEEK2(d + 2); + ram = u->ram; + addr = PEEK2(d + 2); if(ram[addr] == 0x1) { Uint16 i, length = PEEK2(ram + addr + 1); Uint16 a_page = PEEK2(ram + addr + 1 + 2), a_addr = PEEK2(ram + addr + 1 + 4); diff --git a/src/uxn.c b/src/uxn.c @@ -46,7 +46,7 @@ uxn_eval(Uxn *u, Uint16 pc) switch(!(ins & 0x1f) ? (0 - (ins >> 5)) & 0xff : ins & 0x3f) { /* IMM */ case 0x00: /* BRK */ return 1; - case 0xff: /* JCI */ if(!s->dat[--s->ptr]) { pc += 2; break; } + case 0xff: /* JCI */ if(!s->dat[--s->ptr]) { pc += 2; break; } /* else fallthrough */ case 0xfe: /* JMI */ pc += PEEK2(ram + pc) + 2; break; case 0xfd: /* JSI */ SET(0, 2) PUT2(pc + 2) pc += PEEK2(ram + pc) + 2; break; case 0xfc: /* LITr */ case 0xfa: SET(0, 1) PUT1(ram[pc++]) break;