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

Function TestJMPR

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

Source from the content-addressed store, hash-verified

320}
321
322func TestJMPR(t *testing.T) {
323 ClearMem()
324 testJMPR(0x0030, [4]uint16{0x0083, 0x0001, 0x0001, 0x0001}, 0x0083, t)
325 testJMPR(0x0031, [4]uint16{0x0001, 0x00F1, 0x0001, 0x0001}, 0x00F1, t)
326 testJMPR(0x0032, [4]uint16{0x0001, 0x0001, 0x00BB, 0x0001}, 0x00BB, t)
327 testJMPR(0x0033, [4]uint16{0x0001, 0x0001, 0x0001, 0xFF19}, 0xFF19, t)
328}
329
330func testJMPR(instruction uint16, inputRegisters [4]uint16, expectedIAR uint16, t *testing.T) {
331 c := SetUpCPU()

Callers

nothing calls this directly

Calls 2

ClearMemFunction · 0.85
testJMPRFunction · 0.85

Tested by

no test coverage detected