1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00
CLK/OSBindings/Mac/Clock SignalTests/ZexallTests.swift

30 lines
649 B
Swift
Raw Normal View History

//
// ZexallTests.swift
// Clock Signal
//
// Created by Thomas Harte on 16/05/2017.
// Copyright © 2017 Thomas Harte. All rights reserved.
//
import XCTest
import Foundation
class ZexallTests: XCTestCase {
func testZexall() {
if let filename = Bundle(for: type(of: self)).path(forResource: "zexall", ofType: "com") {
if let testData = try? Data(contentsOf: URL(fileURLWithPath: filename)) {
let machine = CSTestMachineZ80()
machine.setData(testData, atAddress: 0x0100)
machine.setValue(0x0100, for: .programCounter)
machine.setValue(0xffff, for: .stackPointer)
machine.runForNumber(ofCycles: 20)
}
}
}
}