mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-16 05:27:43 +00:00
Added tests for EXX, EX (SP), HL and EX (SP), IX. The latter two currently being incorrect.
This commit is contained in:
@@ -429,4 +429,43 @@ class Z80MachineCycleTests: XCTestCase {
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EXX
|
||||||
|
func testEXX() {
|
||||||
|
test(
|
||||||
|
program: [0xd9],
|
||||||
|
busCycles: [
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// EX (SP), HL
|
||||||
|
func testEXSPHL() {
|
||||||
|
test(
|
||||||
|
program: [0xe3],
|
||||||
|
busCycles: [
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
MachineCycle(operation: .read, length: 3),
|
||||||
|
MachineCycle(operation: .read, length: 4),
|
||||||
|
MachineCycle(operation: .write, length: 3),
|
||||||
|
MachineCycle(operation: .write, length: 5),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// EX (SP), IX
|
||||||
|
func testEXSPIX() {
|
||||||
|
test(
|
||||||
|
program: [0xdd, 0xe3],
|
||||||
|
busCycles: [
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
MachineCycle(operation: .read, length: 3),
|
||||||
|
MachineCycle(operation: .read, length: 4),
|
||||||
|
MachineCycle(operation: .write, length: 3),
|
||||||
|
MachineCycle(operation: .write, length: 5),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user