uxn

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

commit fec233db2ab232a1ef3eaba7d954dcf2171337eb
parent d5253086b54911bf33db635fa5eadf03eee35a6a
Author: neauoire <aliceffekt@gmail.com>
Date:   Mon, 18 Apr 2022 12:33:30 -0700

Use helpers for LIT

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

diff --git a/src/uxn.c b/src/uxn.c @@ -66,8 +66,7 @@ uxn_eval(Uxn *u, Uint16 pc) bs = instr & 0x20 ? 1 : 0; switch(instr & 0x1f) { /* Stack */ - case 0x00: /* LIT */ if(bs) { PEEK16(a, pc) PUSH16(src, a) pc += 2; } - else { a = u->ram[pc]; PUSH8(src, a) pc++; } break; + case 0x00: /* LIT */ PEEK(a, pc) PUSH(src, a) pc += 1 + bs; break; case 0x01: /* INC */ POP(a) PUSH(src, a + 1) break; case 0x02: /* POP */ POP(a) break; case 0x03: /* NIP */ POP(a) POP(b) PUSH(src, a) break;