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

Function TestJMPCA

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

Source from the content-addressed store, hash-verified

406}
407
408func TestJMPCA(t *testing.T) {
409 ClearMem()
410 // Jump If Carry or A larger
411 // carry condition
412 testJMPConditional(0x005C, 0x0090, 0x0081, [4]uint16{0x0004, 0xFFFF, 0x0001, 0x002}, 0x0090, t)
413 // a is larger
414 testJMPConditional(0x005C, 0x0090, 0x0081, [4]uint16{0x000A, 0x0001, 0x0001, 0x002}, 0x0090, t)
415 // should not jump in false case
416 testJMPConditional(0x005C, 0x0091, 0x0081, [4]uint16{0x0001, 0x0001, 0x0001, 0x0001}, 0x0003, t)
417}
418
419func TestJMPCE(t *testing.T) {
420 ClearMem()

Callers

nothing calls this directly

Calls 2

ClearMemFunction · 0.85
testJMPConditionalFunction · 0.85

Tested by

no test coverage detected