Removed redundant modulo operations.
This commit is contained in:
parent
296d4c5070
commit
44157aae5b
|
@ -64,7 +64,7 @@ void op_div(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b
|
|||
void op_and(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b & a); }
|
||||
void op_ora(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b | a); }
|
||||
void op_eor(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b ^ a); }
|
||||
void op_sft(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b >> ((a & 0x0f) % 8) << (((a & 0xf0) >> 4) % 8)); }
|
||||
void op_sft(Uxn *u) { Uint8 a = pop8(u->src), b = pop8(u->src); push8(u->src, b >> (a & 0x07) << ((a & 0x70) >> 4)); }
|
||||
/* Stack */
|
||||
void op_lit16(Uxn *u) { u->literal += 2; }
|
||||
void op_nop16(Uxn *u) { printf("%04x\n", pop16(u->src)); }
|
||||
|
@ -97,7 +97,7 @@ void op_div16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->s
|
|||
void op_and16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b & a); }
|
||||
void op_ora16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b | a); }
|
||||
void op_eor16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b ^ a); }
|
||||
void op_sft16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b >> ((a & 0x000f) % 16) << (((a & 0x00f0) >> 4) % 16)); }
|
||||
void op_sft16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b >> (a & 0x000f) << ((a & 0x00f0) >> 4)); }
|
||||
|
||||
void (*ops[])(Uxn *u) = {
|
||||
op_brk, op_nop, op_lit, op_pop, op_dup, op_swp, op_ovr, op_rot,
|
||||
|
|
Loading…
Reference in New Issue