From fc6328148da92b542bea5945b79860e1b3ad6b3c Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 25 Aug 2024 09:27:46 -0700 Subject: [PATCH] (uxn.c) Silenced warnings --- src/uxn.c | 8 ++++---- src/uxn11.c | 2 +- src/uxncli.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/uxn.c b/src/uxn.c index 3de7530..275b829 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -24,7 +24,7 @@ WITH REGARD TO THIS SOFTWARE. /* Microcode */ -#define JMI pc += uxn.ram[pc++] << 8 | uxn.ram[pc++]; +#define JMI a = uxn.ram[pc ] << 8 | uxn.ram[pc + 1], pc += a + 2; #define JMP(i) if(_2) pc = i; else pc += (Sint8)i; #define REM if(_r) uxn.rst.ptr -= 1 + _2; else uxn.wst.ptr -= 1 + _2; #define INC(s) uxn.s.dat[uxn.s.ptr++] @@ -36,7 +36,7 @@ WITH REGARD TO THIS SOFTWARE. #define PU1(i) if(_r) INC(rst) = i; else INC(wst) = i; #define RP1(i) if(_r) INC(wst) = i; else INC(rst) = i; #define GET(o) if(_2) PO1(o[1]) PO1(o[0]) -#define PUT(i) PU1(i[0]) if(_2) PU1(i[1]) +#define PUT(i) PU1(i[0]) if(_2) { PU1(i[1]) } #define DEI(i,o) o[0] = emu_dei(i); if(_2) o[1] = emu_dei(i + 1); PUT(o) #define DEO(i,j) emu_deo(i, j[0]); if(_2) emu_deo(i + 1, j[1]); #define PEK(i,o,m) o[0] = uxn.ram[i]; if(_2) o[1] = uxn.ram[(i + 1) & m]; PUT(o) @@ -69,9 +69,9 @@ uxn_eval(Uint16 pc) /* GTH */ OPC(0x0a, POx(a) POx(b),PU1(b > a)) /* LTH */ OPC(0x0b, POx(a) POx(b),PU1(b < a)) /* JMP */ OPC(0x0c, POx(a),JMP(a)) - /* JCN */ OPC(0x0d, POx(a) PO1(b), if(b) JMP(a)) + /* JCN */ OPC(0x0d, POx(a) PO1(b), if(b) { JMP(a) }) /* JSR */ OPC(0x0e, POx(a),RP1(pc >> 8) RP1(pc) JMP(a)) - /* STH */ OPC(0x0f, GET(x),RP1(x[0]) if(_2) RP1(x[1])) + /* STH */ OPC(0x0f, GET(x),RP1(x[0]) if(_2) { RP1(x[1]) }) /* LDZ */ OPC(0x10, PO1(a),PEK(a, x, 0xff)) /* STZ */ OPC(0x11, PO1(a) GET(y),POK(a, y, 0xff)) /* LDR */ OPC(0x12, PO1(a),PEK(pc + (Sint8)a, x, 0xffff)) diff --git a/src/uxn11.c b/src/uxn11.c index d50f0d7..de71966 100644 --- a/src/uxn11.c +++ b/src/uxn11.c @@ -266,7 +266,7 @@ main(int argc, char **argv) int i = 1; char *rom; if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') { - fprintf(stdout, "Uxn11 - Varvara Emulator, 22 Aug 2024.\n"); + fprintf(stdout, "Uxn11 - Varvara Emulator, 25 Aug 2024.\n"); exit(0); } rom = i == argc ? "boot.rom" : argv[i++]; diff --git a/src/uxncli.c b/src/uxncli.c index 0b5f5c0..b6c1e39 100644 --- a/src/uxncli.c +++ b/src/uxncli.c @@ -68,7 +68,7 @@ main(int argc, char **argv) int i = 1; char *rom; if(i != argc && argv[i][0] == '-' && argv[i][1] == 'v') { - fprintf(stdout, "Uxncli - Console Varvara Emulator, 22 Aug 2024.\n"); + fprintf(stdout, "Uxncli - Console Varvara Emulator, 25 Aug 2024.\n"); exit(0); } rom = i == argc ? "boot.rom" : argv[i++];