(state bool)
| 895 | } |
| 896 | |
| 897 | func (c *CPU) runSetOnTMP(state bool) { |
| 898 | c.tmpSetANDGate.Update(state, c.step4Gates[0].Output()) |
| 899 | updateSetStatus(&c.tmp, c.tmpSetANDGate.Output()) |
| 900 | |
| 901 | // We will add a new memory bit called |
| 902 | // "Carry Temp" that goes between the Carry Flag and the enabler |
| 903 | // we just added above. It will be set in step 4, the same time that the TMP register gets |
| 904 | // set. Thus, the ALU instruction will have a carry input that cannot change during step 5. |
| 905 | c.carryTemp.Update(c.flagsBus.GetOutputWire(FLAGS_BUS_CARRY), c.tmpSetANDGate.Output()) |
| 906 | c.carryANDGate.Update(c.carryTemp.Get(), c.step5Gates[0].Output()) |
| 907 | } |
| 908 | |
| 909 | func (c *CPU) runSetOnRegisterB() { |
| 910 | c.registerBSetORGate.Update( |
no test coverage detected