Swapped JCI and JMI

This commit is contained in:
Devine Lu Linvega 2023-01-12 09:45:19 -08:00
parent 256b7cafce
commit 7616af7cae
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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 */