mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Fix ROL.
This commit is contained in:
parent
3b95726655
commit
e2c615f20b
@ -616,7 +616,7 @@ export default function CPU6502(options)
|
||||
function rol(readAddrFn) {
|
||||
var addr = readAddrFn({rwm: true});
|
||||
var oldVal = readByte(addr);
|
||||
writeByte(oldVal);
|
||||
writeByte(addr, oldVal);
|
||||
var val = rotateLeft(oldVal);
|
||||
writeByte(addr, val);
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ import CPU6502 from '../js/cpu6502';
|
||||
import Test6502 from '../js/roms/6502test';
|
||||
import Test65C02 from '../js/roms/65C02test';
|
||||
|
||||
import { toHex } from '../js/util';
|
||||
|
||||
describe('CPU', function () {
|
||||
var cpu;
|
||||
var lastPC = 0;
|
||||
@ -25,7 +27,7 @@ describe('CPU', function () {
|
||||
cpu.stepCyclesDebug(1000, traceCB);
|
||||
} while (!done);
|
||||
|
||||
expect(lastPC).toEqual(0x3469);
|
||||
expect(toHex(lastPC)).toEqual(toHex(0x3469));
|
||||
});
|
||||
});
|
||||
|
||||
@ -40,7 +42,7 @@ describe('CPU', function () {
|
||||
cpu.stepCyclesDebug(1000, traceCB);
|
||||
} while (!done);
|
||||
|
||||
expect(lastPC).toEqual(0x24f1);
|
||||
expect(toHex(lastPC)).toEqual(toHex(0x24f1));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user