@@ -1593,14 +1593,16 @@ func TestExecute(t *testing.T) {
15931593 wantCPU : & CPU {A : 0x02 , stackPointer : 0xFFFF , programCounter : 0x0007 },
15941594 },
15951595 {
1596- // RST instructions are tricky to test, as they have predetermined jump points set by the CPU
1597- // for use by interrupts, starting at 0x0000 and finishing at 0x0038. Our tests below simply
1598- // confirm that each of the RST instructions jump to the correct HLT location, then
1599- // testing that the programCounter matches the expected value.
1596+ // RST instructions are tricky to test, as they have predetermined
1597+ // jump points set by the CPU for use by interrupts, starting at
1598+ // 0x0000 and finishing at 0x0038. Our tests below confirm that
1599+ // each RST instruction jumps to the correct HLT location, then
1600+ // tests that the programCounter matches the expected value.
16001601 //
1601- // RST 0 is missing from this list as it has a jump destination of 0x0000. This makes
1602- // it very difficult to test the RET from the instruction until we have a way to set the
1603- // entry point of the bytecode with an ORG directive in the assembler.
1602+ // RST 0 is missing from this list as it has a jump destination
1603+ // of 0x0000, making it very difficult to test the RET from the
1604+ // instruction until we have a way to set the entry point of the
1605+ // bytecode with an ORG directive in the assembler.
16041606 name : "RST 1" ,
16051607 code : "RST 1\n INR A\n INR A\n INR A\n INR A\n INR A\n INR A\n INR A\n HLT\n INR A" ,
16061608 initCPU : & CPU {stackPointer : 0xFFFF },
0 commit comments