Faster Pushxx
This commit is contained in:
parent
901f76ed52
commit
52fac7c52b
|
@ -19,7 +19,7 @@ WITH REGARD TO THIS SOFTWARE.
|
|||
#define PUSH1(y) { if(s->ptr == 0xff) HALT(2) s->dat[s->ptr++] = (y); }
|
||||
#define PUSH2(y) { if((tsp = s->ptr) >= 0xfe) HALT(2) t = (y); POKE2(&s->dat[tsp], t); s->ptr = tsp + 2; }
|
||||
#define PUSHx(y) { if(m2) { PUSH2(y) } else { PUSH1(y) } }
|
||||
#define PUSHxx(y, z) { if(m2) { PUSH2(y) PUSH2(z) } else { PUSH1(y) PUSH1(z) } }
|
||||
#define PUSHxx(y, z) { if(m2) { PUSH2(y) PUSH2(z) } else { PUSH2(y << 8 | z) } }
|
||||
#define POP1(o) { if(*sp == 0x00) HALT(1) o = s->dat[--*sp]; }
|
||||
#define POP2(o) { if((tsp = *sp) <= 0x01) HALT(1) o = PEEK2(&s->dat[tsp - 2]); *sp = tsp - 2; }
|
||||
#define POPx(o) { if(m2) { POP2(o) } else { POP1(o) } }
|
||||
|
|
Loading…
Reference in New Issue