mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Find first failing execution, note reason.
This commit is contained in:
parent
2d17d9d316
commit
82f0cd790f
@ -118,10 +118,15 @@ inline void aam(CPU::RegisterPair16 &ax, uint8_t imm, Status &status) {
|
|||||||
The SF, ZF, and PF flags are set according to the result.
|
The SF, ZF, and PF flags are set according to the result.
|
||||||
The OF, AF, and CF flags are undefined.
|
The OF, AF, and CF flags are undefined.
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
|
If ... an immediate value of 0 is used, it will cause a #DE (divide error) exception.
|
||||||
|
*/
|
||||||
ax.halves.high = ax.halves.low / imm;
|
ax.halves.high = ax.halves.low / imm;
|
||||||
ax.halves.low = ax.halves.low % imm;
|
ax.halves.low = ax.halves.low % imm;
|
||||||
status.sign = ax.halves.low & 0x80;
|
status.sign = ax.halves.low & 0x80;
|
||||||
status.parity = status.zero = ax.halves.low;
|
status.parity = status.zero = ax.halves.low;
|
||||||
|
|
||||||
|
// TODO: #DE.
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void aas(CPU::RegisterPair16 &ax, Status &status) {
|
inline void aas(CPU::RegisterPair16 &ax, Status &status) {
|
||||||
|
@ -315,20 +315,23 @@ struct FlowController {
|
|||||||
if(assert) {
|
if(assert) {
|
||||||
XCTAssert(
|
XCTAssert(
|
||||||
statusEqual,
|
statusEqual,
|
||||||
"Status doesn't match — differs in %02x after %@",
|
"Status doesn't match — differs in %02x after %@; executing %@",
|
||||||
intended_status.get() ^ status.get(),
|
intended_status.get() ^ status.get(),
|
||||||
test[@"name"]
|
test[@"name"],
|
||||||
|
[self toString:decoded.second offsetLength:4 immediateLength:4]
|
||||||
);
|
);
|
||||||
// TODO: should probably say more about the following two.
|
// TODO: should probably say more about the following two.
|
||||||
XCTAssert(
|
XCTAssert(
|
||||||
registersEqual,
|
registersEqual,
|
||||||
"Register mismatch after %@",
|
"Register mismatch after %@; executing %@",
|
||||||
test[@"name"]
|
test[@"name"],
|
||||||
|
[self toString:decoded.second offsetLength:4 immediateLength:4]
|
||||||
);
|
);
|
||||||
XCTAssert(
|
XCTAssert(
|
||||||
ramEqual,
|
ramEqual,
|
||||||
"Memory contents mismatch after %@",
|
"Memory contents mismatch after %@; executing %@",
|
||||||
test[@"name"]
|
test[@"name"],
|
||||||
|
[self toString:decoded.second offsetLength:4 immediateLength:4]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user