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

Function TestJMPCZ

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

Source from the content-addressed store, hash-verified

428}
429
430func TestJMPCZ(t *testing.T) {
431 ClearMem()
432 // Jump If Carry or zero flag
433 // carry condition
434 testJMPConditional(0x0059, 0x0090, 0x0081, [4]uint16{0x0004, 0xFFFF, 0x0001, 0x002}, 0x0090, t)
435 // zero flag
436 testJMPConditional(0x0059, 0x0090, 0x00B0, [4]uint16{0xFFFF, 0x00FE, 0x00FE, 0x00FE}, 0x0090, t)
437 // should not jump in false case
438 testJMPConditional(0x0059, 0x0091, 0x0081, [4]uint16{0x0001, 0x0002, 0x0001, 0x0001}, 0x0003, t)
439}
440
441func TestJMPAE(t *testing.T) {
442 ClearMem()

Callers

nothing calls this directly

Calls 2

ClearMemFunction · 0.85
testJMPConditionalFunction · 0.85

Tested by

no test coverage detected