diff options
Diffstat (limited to 'opcode.h')
-rw-r--r-- | opcode.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -10,7 +10,7 @@ #define getclk 0 #define keypoll 0 -#define OPNUM 88 +#define OPNUM 87 #define C (1 << 0) /* Carry flag. */ #define Z (1 << 1) /* Zero flag. */ @@ -38,7 +38,7 @@ extern uint8_t get_addrsize(uint8_t prefix, uint8_t addrmode); #define setreg_sw(reg, reg_idx, val, val_idx, prefix, addrmode, type) {\ switch (type) {\ - case RS: setreg(reg, +, reg_idx, val, +, val_idx, (1 << (prefix >> 4))-1); break;\ + case RS: setreg(reg, +, reg_idx, val, +, val_idx, (1 << ((prefix >> 4) & 3))-1); break;\ case AM: setreg(reg, +, reg_idx, val, +, val_idx, get_addrsize(prefix, addrmode)); break;\ }\ } |