mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Added tests for EXX, EX (SP), HL and EX (SP), IX. The latter two currently being incorrect.
This commit is contained in:
parent
002098d496
commit
8d60734737
@ -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),
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user