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

Function TestFlagsRegisterAllFalse

cpu/cpu_test.go:58–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestFlagsRegisterAllFalse(t *testing.T) {
59 ClearMem()
60 c := SetUpCPU()
61
62 setMemoryLocation(c, 0x0000, 0x0081)
63 setRegisters(c, [4]uint16{0x0009, 0x000A, 0x0002, 0x0003})
64 c.SetIAR(0x0000)
65
66 doFetchDecodeExecute(c)
67
68 checkFlagsRegister(c, false, false, false, false, t)
69}
70
71func TestFlagsRegisterCarryFlagEnabled(t *testing.T) {
72 ClearMem()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected