1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Added DJNZ test.

This commit is contained in:
Thomas Harte 2017-06-19 21:31:56 -04:00
parent cb277b8d1e
commit fadbfdf801

View File

@ -956,4 +956,27 @@ class Z80MachineCycleTests: XCTestCase {
]
)
}
// DJNZ
func testDJNZ() {
test(
program: [
0x06, 0x02, // LD B, 2
0x10, 0xfe, // DJNZ -2
],
busCycles: [
MachineCycle(operation: .readOpcode, length: 4),
MachineCycle(operation: .read, length: 3),
MachineCycle(operation: .readOpcode, length: 5),
MachineCycle(operation: .read, length: 3),
MachineCycle(operation: .internalOperation, length: 5),
MachineCycle(operation: .readOpcode, length: 5),
MachineCycle(operation: .read, length: 3),
MachineCycle(operation: .readOpcode, length: 4),
]
)
}
}