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

Function TestJMPZ

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

Source from the content-addressed store, hash-verified

397 testJMPConditional(0x0052, 0x00AF, 0x00F1, [4]uint16{0x0010, 0x0011, 0x0001, 0x0001}, 0x0003, t)
398}
399func TestJMPZ(t *testing.T) {
400 ClearMem()
401 // perform NOT on R0 (0x00FF) to trigger zero flag
402 testJMPConditional(0x0051, 0x00AE, 0x00B0, [4]uint16{0xFFFF, 0x0001, 0x0001, 0x001}, 0x00AE, t)
403
404 // should not jump in false case
405 testJMPConditional(0x0051, 0x00AF, 0x00B0, [4]uint16{0x0000, 0x0011, 0x0001, 0x0001}, 0x0003, t)
406}
407
408func TestJMPCA(t *testing.T) {
409 ClearMem()

Callers

nothing calls this directly

Calls 2

ClearMemFunction · 0.85
testJMPConditionalFunction · 0.85

Tested by

no test coverage detected