Bug fix: INX did not store the result correctly

This commit is contained in:
Takashi Toyoshima 2014-12-08 00:46:38 +09:00
parent 82990fdab7
commit 729cac78a0
2 changed files with 2 additions and 2 deletions

2
6502.S
View File

@ -1525,7 +1525,7 @@ ope6: // INC - Zero Page
ope8: // INX
_fromReg RX
_inc
_toAddr
_toReg RX
_decode
ope9: // SBC - Immediate

2
test.c
View File

@ -20,7 +20,7 @@ void cpu6502_dump(uint32_t pc, uint32_t a, uint32_t x, uint32_t y,
uint32_t sp, uint32_t sr) {
uint8_t fp;
__asm__("movs %0, r12": "=r"(fp));
assert(pc < 0x1000);
assert(pc < 0x10000);
assert(a < 0x100);
assert(x < 0x100);
assert(y < 0x100);