(instruction uint16, inputRegisters, expectedOutputRegisters [4]uint16, t *testing.T)
| 668 | } |
| 669 | |
| 670 | func testALUAddWithCarry(instruction uint16, inputRegisters, expectedOutputRegisters [4]uint16, t *testing.T) { |
| 671 | c := SetUpCPU() |
| 672 | |
| 673 | setMemoryLocation(c, 0x0000, instruction) |
| 674 | setMemoryLocation(c, 0x0001, instruction) |
| 675 | |
| 676 | c.SetIAR(0x0000) |
| 677 | |
| 678 | setRegisters(c, inputRegisters) |
| 679 | doFetchDecodeExecute(c) |
| 680 | setRegisters(c, [4]uint16{0x0000, 0x0000, 0x0000, 0x0000}) // zeros so that we can see the carry flag cause a change |
| 681 | doFetchDecodeExecute(c) |
| 682 | |
| 683 | checkRegisters(c, expectedOutputRegisters[0], expectedOutputRegisters[1], expectedOutputRegisters[2], expectedOutputRegisters[3], t) |
| 684 | } |
| 685 | |
| 686 | func TestALUNOT(t *testing.T) { |
| 687 | ClearMem() |
no test coverage detected