private void ExecuteDECFSZ(int destinationSelect, int fileRegisterAddress) { var result = _alu.Decrement(_registerAdressTable[fileRegisterAddress].Content, false); IncreaseCycle(1); WriteResultDependingOnDestinationSelect(destinationSelect, result, fileRegisterAddress); ProgramCounterContent++; if (result == 0) { ExecuteNOP(); } }
private void ExecuteDECFSZ(int destinationSelect, int fileRegisterAddress) { //decrements fileRegister and loads result depending on destination select either in w_reg or f_reg. if placed in w_reg, skip next operation,execute NOP instead var result = _alu.Decrement(_registerAdressTable[fileRegisterAddress].Content, false); IncreaseCycle(1); WriteResultDependingOnDestinationSelect(destinationSelect, result, fileRegisterAddress); ProgramCounterContent++; if (result == 0) { ExecuteNOP(); } }