...
|
...
|
@@ -39,20 +39,20 @@ WITH REGARD TO THIS SOFTWARE.
|
39
|
39
|
int
|
40
|
40
|
uxn_eval(Uxn *u, Uint16 pc)
|
41
|
41
|
{
|
42
|
|
- int t, n, l, k, tmp, opc, ins;
|
43
|
|
- Uint8 *ram = u->ram;
|
|
42
|
+ int t, n, l, k, tmp, ins;
|
|
43
|
+ Uint8 *ram = u->ram, opc;
|
44
|
44
|
Stack *s;
|
45
|
45
|
if(!pc || u->dev[0x0f]) return 0;
|
46
|
46
|
for(;;) {
|
47
|
47
|
ins = ram[pc++];
|
48
|
48
|
k = ins & 0x80 ? 0xff : 0;
|
49
|
49
|
s = ins & 0x40 ? &u->rst : &u->wst;
|
50
|
|
- opc = !(ins & 0x1f) ? (0 - (ins >> 5)) & 0xff : ins & 0x3f;
|
|
50
|
+ opc = !(ins & 0x1f) ? (0 - (ins >> 5)) : ins & 0x3f;
|
51
|
51
|
switch(opc) {
|
52
|
52
|
/* IMM */
|
53
|
|
- case 0x00: /* BRK */ return 1;
|
54
|
|
- case 0xff: /* JCI */ pc += !!s->dat[--s->ptr] * PEEK2(ram + pc) + 2; break;
|
55
|
|
- case 0xfe: /* JMI */ pc += PEEK2(ram + pc) + 2; break;
|
|
53
|
+ case 0x00: /* BRK */ return 1;
|
|
54
|
+ case 0xff: /* JCI */ if(!s->dat[--s->ptr]) { pc += 2; break; }
|
|
55
|
+ case 0xfe: /* JMI */ pc += PEEK2(ram + pc) + 2; break;
|
56
|
56
|
case 0xfd: /* JSI */ SET(0, 2) PUT2(0, pc + 2) pc += PEEK2(ram + pc) + 2; break;
|
57
|
57
|
case 0xfc: /* LIT */ SET(0, 1) PUT(0, ram[pc++]) break;
|
58
|
58
|
case 0xfb: /* LIT2 */ SET(0, 2) PUT2(0, PEEK2(ram + pc)) pc += 2; break;
|