Faster CALL opcodes
This commit is contained in:
parent
194e9c8949
commit
a124ca95b0
|
@ -48,10 +48,10 @@ uxn_eval(Uxn *u, Uint16 pc)
|
||||||
switch(instr & 0x1f) {
|
switch(instr & 0x1f) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
/* Literals/Calls */
|
/* Literals/Calls */
|
||||||
if(instr == 0x20) /* JMI */ { sp = &u->wst->ptr; PEEK16(a, pc) pc = a; }
|
if(instr == 0x20) /* JMI */ { PEEK16(a, pc) pc = a; }
|
||||||
else if(instr == 0x40) /* JCI */ { sp = &u->wst->ptr; src = u->wst; POP8(a) PEEK16(b, pc) pc = a ? (Uint16)b : pc + 2; }
|
else if(instr == 0x40) /* JCI */ { sp = &u->wst->ptr; src = u->wst; POP8(a) if(a) { PEEK16(b, pc) pc = b; } else { pc += 2; } }
|
||||||
else if(instr == 0x60) /* JSI */ { sp = &u->wst->ptr; PEEK16(a, pc) PUSH16(u->rst, pc + 2) pc = a; }
|
else if(instr == 0x60) /* JSI */ { PEEK16(a, pc) PUSH16(u->rst, pc + 2) pc = a; }
|
||||||
else if(bs) /* LIT2 */ { PEEK16(a, pc) PUSH16(src, a) pc = pc + 2; }
|
else if(bs) /* LIT2 */ { PEEK16(a, pc) PUSH16(src, a) pc += 2; }
|
||||||
else /* LITr */ { a = u->ram[pc++]; PUSH8(src, a) } break;
|
else /* LITr */ { a = u->ram[pc++]; PUSH8(src, a) } break;
|
||||||
/* ALU */
|
/* ALU */
|
||||||
case 0x01: /* INC */ POP(a) PUSH(src, a + 1) break;
|
case 0x01: /* INC */ POP(a) PUSH(src, a + 1) break;
|
||||||
|
|
Loading…
Reference in New Issue