(state bool)
| 918 | } |
| 919 | |
| 920 | func (c *CPU) runSetGeneralPurposeRegisters(state bool) { |
| 921 | c.instructionDecoderSet2x4.Update(c.ir.Bit(14), c.ir.Bit(15)) |
| 922 | |
| 923 | // R0 |
| 924 | c.gpRegSetANDGates[0].Update(state, c.registerBSet.Get(), c.instructionDecoderSet2x4.GetOutputWire(0)) |
| 925 | updateSetStatus(&c.gpReg0, c.gpRegSetANDGates[0].Output()) |
| 926 | |
| 927 | // R1 |
| 928 | c.gpRegSetANDGates[1].Update(state, c.registerBSet.Get(), c.instructionDecoderSet2x4.GetOutputWire(1)) |
| 929 | updateSetStatus(&c.gpReg1, c.gpRegSetANDGates[1].Output()) |
| 930 | |
| 931 | // R2 |
| 932 | c.gpRegSetANDGates[2].Update(state, c.registerBSet.Get(), c.instructionDecoderSet2x4.GetOutputWire(2)) |
| 933 | updateSetStatus(&c.gpReg2, c.gpRegSetANDGates[2].Output()) |
| 934 | |
| 935 | // R3 |
| 936 | c.gpRegSetANDGates[3].Update(state, c.registerBSet.Get(), c.instructionDecoderSet2x4.GetOutputWire(3)) |
| 937 | updateSetStatus(&c.gpReg3, c.gpRegSetANDGates[3].Output()) |
| 938 | } |
| 939 | |
| 940 | func runUpdateOn(component Updatable) { |
| 941 | component.Update() |
no test coverage detected