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

Function TestFlagsRegisterIsEqualsFlagEnabled

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

Source from the content-addressed store, hash-verified

95}
96
97func TestFlagsRegisterIsEqualsFlagEnabled(t *testing.T) {
98 ClearMem()
99 c := SetUpCPU()
100
101 setMemoryLocation(c, 0x0000, 0x0081)
102 setRegisters(c, [4]uint16{0x0021, 0x0021, 0x0002, 0x0003})
103 c.SetIAR(0x0000)
104
105 doFetchDecodeExecute(c)
106
107 checkFlagsRegister(c, false, false, true, false, t)
108}
109
110func TestFlagsRegisterIsZeroFlagEnabled(t *testing.T) {
111 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