uxn

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

commit 48596a6ee73aa5979c6aa375d972c8b53c0b00d7
parent 7f275772ef387c51a6d8a09d21bfcf2082490f3a
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Sun,  1 Jan 2023 16:22:37 -0800

Removed PEEK16 macro

Diffstat:
Msrc/uxn.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/uxn.c b/src/uxn.c @@ -25,8 +25,7 @@ WITH REGARD TO THIS SOFTWARE. #define POP16(o) { if((j = *sp) <= 1) HALT(1) o = src->dat[j - 1]; o += src->dat[j - 2] << 8; *sp = j - 2; } #define POP(o) { if(bs) { POP16(o) } else { POP8(o) } } #define POKE(x, y) { if(bs) { u->ram[(x)] = (y) >> 8; u->ram[(x) + 1] = (y); } else { u->ram[(x)] = y; } } -#define PEEK16(o, x) { o = (u->ram[(x)] << 8) + u->ram[(x) + 1]; } -#define PEEK(o, x) { if(bs) { PEEK16(o, x) } else { o = u->ram[(x)]; } } +#define PEEK(o, x) { if(bs) { o = (u->ram[(x)] << 8) + u->ram[(x) + 1]; } else { o = u->ram[(x)]; } } #define DEVR(o, x) { o = u->dei(u, x); if (bs) o = (o << 8) + u->dei(u, ((x) + 1) & 0xFF); } #define DEVW(x, y) { if (bs) { u->deo(u, (x), (y) >> 8); u->deo(u, ((x) + 1) & 0xFF, (y)); } else { u->deo(u, x, (y)); } } #define JUMP(x) { if(bs) pc = (x); else pc += (Sint8)(x); }