MCPcopy Create free account
hub / github.com/djhworld/simple-computer / testCLF

Function testCLF

cpu/cpu_test.go:596–612  ·  view source on GitHub ↗
(initialInstruction uint16, initialRegisters [4]uint16, t *testing.T)

Source from the content-addressed store, hash-verified

594}
595
596func testCLF(initialInstruction uint16, initialRegisters [4]uint16, t *testing.T) {
597 var insAddr uint16 = 0x0000
598
599 c := SetUpCPU()
600
601 setMemoryLocation(c, insAddr, initialInstruction)
602 setMemoryLocation(c, insAddr+1, 0x0060)
603
604 c.SetIAR(insAddr)
605
606 setRegisters(c, initialRegisters)
607
608 doFetchDecodeExecute(c)
609 doFetchDecodeExecute(c)
610
611 checkFlagsRegister(c, false, false, false, false, t)
612}
613
614func TestALUAdd(t *testing.T) {
615 ClearMem()

Callers 1

TestCLFFunction · 0.85

Calls 6

SetUpCPUFunction · 0.85
setMemoryLocationFunction · 0.85
setRegistersFunction · 0.85
doFetchDecodeExecuteFunction · 0.85
checkFlagsRegisterFunction · 0.85
SetIARMethod · 0.80

Tested by

no test coverage detected