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

Function TestInstructionReceivedFromMemory

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

Source from the content-addressed store, hash-verified

36}
37
38func TestInstructionReceivedFromMemory(t *testing.T) {
39 ClearMem()
40 c := SetUpCPU()
41
42 instructions := []uint16{0x008A, 0x0082, 0x0088, 0x0094, 0x00B1}
43
44 var addr uint16 = 0xF00F
45 for _, b := range instructions {
46 setMemoryLocation(c, addr, b)
47 addr++
48 }
49
50 c.SetIAR(0xF00F)
51
52 for _, b := range instructions {
53 doFetchDecodeExecute(c)
54 checkIR(c, b, t)
55 }
56}
57
58func TestFlagsRegisterAllFalse(t *testing.T) {
59 ClearMem()

Callers

nothing calls this directly

Calls 6

ClearMemFunction · 0.85
SetUpCPUFunction · 0.85
setMemoryLocationFunction · 0.85
doFetchDecodeExecuteFunction · 0.85
checkIRFunction · 0.85
SetIARMethod · 0.80

Tested by

no test coverage detected