(instruction uint16, memAddress, memValue uint16, inputRegisters, expectedOutputRegisters []uint16, t *testing.T)
| 219 | } |
| 220 | |
| 221 | func testLD(instruction uint16, memAddress, memValue uint16, inputRegisters, expectedOutputRegisters []uint16, t *testing.T) { |
| 222 | c := SetUpCPU() |
| 223 | var insAddr uint16 = 0x0000 |
| 224 | setMemoryLocation(c, insAddr, instruction) |
| 225 | c.SetIAR(insAddr) |
| 226 | |
| 227 | setMemoryLocation(c, memAddress, memValue) |
| 228 | |
| 229 | for i, v := range inputRegisters { |
| 230 | setRegister(c, i, v) |
| 231 | } |
| 232 | |
| 233 | doFetchDecodeExecute(c) |
| 234 | checkRegisters(c, expectedOutputRegisters[0], expectedOutputRegisters[1], expectedOutputRegisters[2], expectedOutputRegisters[3], t) |
| 235 | } |
| 236 | |
| 237 | func TestST(t *testing.T) { |
| 238 | ClearMem() |
no test coverage detected