mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 07:30:21 +00:00
Added failing tests for both kinds of CALL.
This commit is contained in:
parent
e05076b258
commit
6752f165db
@ -980,7 +980,47 @@ class Z80MachineCycleTests: XCTestCase {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: CALL
|
// CALL
|
||||||
|
func testCALL() {
|
||||||
|
test(
|
||||||
|
program: [0xcd, 0x00, 0x80],
|
||||||
|
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: 3),
|
||||||
|
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// CALL cc
|
||||||
|
func testCALLcc() {
|
||||||
|
test(
|
||||||
|
program: [
|
||||||
|
0x37, // SCF
|
||||||
|
0xd4, // CALL NC
|
||||||
|
0xdc, // CALL C
|
||||||
|
],
|
||||||
|
busCycles: [
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
MachineCycle(operation: .read, length: 3),
|
||||||
|
MachineCycle(operation: .read, length: 3),
|
||||||
|
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
MachineCycle(operation: .read, length: 3),
|
||||||
|
MachineCycle(operation: .read, length: 4),
|
||||||
|
MachineCycle(operation: .write, length: 3),
|
||||||
|
MachineCycle(operation: .write, length: 3),
|
||||||
|
|
||||||
|
MachineCycle(operation: .readOpcode, length: 4),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// RET
|
// RET
|
||||||
func testRET() {
|
func testRET() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user