commit a5442ea4fd2fc44825a6f2a288b893b14932bb5e
parent 5e1c8965544dd7ed08e0dd7f01ac0a0807299cbc
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Thu, 12 Jan 2023 09:44:27 -0800
(uxn.c) Swapped JMI/JCI
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/uxn.c b/src/uxn.c
@@ -50,8 +50,8 @@ uxn_eval(Uxn *u, Uint16 pc)
switch(opcode - (!opcode * (instr >> 5))) {
/* Literals/Calls */
case -0x0: /* BRK */ return 1;
- case -0x1: /* JMI */ PEEK16(a, pc) pc += a + 2; break;
- case -0x2: /* JCI */ sp = &u->wst->ptr; src = u->wst; POP8(b) if(b) { PEEK16(a, pc) pc += a + 2; } else pc += 2; break;
+ case -0x1: /* JCI */ POP8(b) if(!b) { pc += 2; break; }
+ case -0x2: /* JMI */ PEEK16(a, pc) pc += a + 2; break;
case -0x3: /* JSI */ PUSH16(u->rst, pc + 2) PEEK16(a, pc) pc += a + 2; break;
case -0x4: /* LIT */
case -0x6: /* LITr */ a = u->ram[pc++]; PUSH8(src, a) break;
diff --git a/src/uxnasm.c b/src/uxnasm.c
@@ -317,10 +317,10 @@ parse(char *w, FILE *f)
case ';': /* literal short absolute */
makereference(p.scope, w, p.ptr + 1);
return writeshort(0xffff, 1);
- case '!': /* JMI */
+ case '?': /* JCI */
makereference(p.scope, w, p.ptr + 1);
return writebyte(0x20) && writeshort(0xffff, 0);
- case '?': /* JCI */
+ case '!': /* JMI */
makereference(p.scope, w, p.ptr + 1);
return writebyte(0x40) && writeshort(0xffff, 0);
case '"': /* raw string */