private void setPC(BCD10 addr) { if (isPrimaryInput) { primaryInputPC = (int)addr.toUInt64(); } else { accumulators[controlRegister].set(addr); } }
private void processOrder1() { BCD10 b = new BCD10(); if (siriusOpcodeLow < 5) { if (accB > 0) { effectiveOperand.add(accumulators[accB]); } b.setHex64(getMainStore(effectiveOperand.toUInt64())); if (accA == 0) { accumulators[0].set(controlBoxScript.getKeyboard()); } } else { if (accB == 0) { b.set(controlBoxScript.getKeyboard()); } else { b.set(accumulators[accB]); } } switch (siriusOpcodeLow) { case 0: accumulators[accA].add(b); flagOVR |= BCD10.flagOVR; break; case 1: accumulators[accA].sub(b); flagOVR |= BCD10.flagOVR; break; case 2: accumulators[accA].negSub(b); flagOVR |= BCD10.flagOVR; break; case 3: accumulators[accA].negAdd(b); flagOVR |= BCD10.flagOVR; break; case 4: accumulators[accA].set(b); break; case 5: accumulators[accA].add(b); break; case 6: accumulators[accA].sub(b); break; case 7: accumulators[accA].negSub(b); break; case 8: accumulators[accA].negAdd(b); break; case 9: accumulators[accA].set(b); break; } }
public void processOneOrder() { if (isPrimaryInput) { if (!isWaitingR) { currentOrder.setHex64(primaryInputMicroProgram[primaryInputPC]); primaryInputPC = primaryInputPC + 1; } } else { if (manualPressed) { if (!isRetrying) { if (flagInputAccepted) { flagInputAccepted = false; currentOrder.set(acceptedInput); } else { currentOrder.set(controlBoxScript.getKeyboard()); } } } else { if (!isRetrying) { currentOrder.setHex64(getMainStore(accumulators[controlRegister].toUInt64())); if (kbWaitPressed && accumulators[controlRegister].toUInt64() % mainStoreModulus == kbValue.toUInt64() % mainStoreModulus) { isStoppedKB = true; } accumulators[controlRegister].add(new BCD10(1)); // OK? } } } accB = currentOrder.digits[0]; accA = currentOrder.digits[1]; siriusOpcodeLow = currentOrder.digits[2]; siriusOpcodeHigh = currentOrder.digits[3]; siriusOperand.setUInt32((UInt32)(currentOrder.toUInt64() / 10000L)); effectiveOperand.setBCD6(siriusOperand); addCycles(3 * cycleFactor); switch (siriusOpcodeHigh) { case 0: processOrder0(); break; case 1: processOrder1(); break; case 2: processOrder2(); break; case 3: processOrder3(); break; case 4: processOrder4(); break; case 5: processOrder5(); break; case 6: processOrder6(); break; case 7: processOrder7(); break; case 8: processOrder8(); break; case 9: processOrder9(); break; default: break; } isRetryingForFrame &= isRetrying; }