/// <summary> /// Store MQ 2 STQ Y -0600 /// The C(MQ) replace the C(Y). The C(MQ) are unchanged. /// </summary> /// <param name="cpu"></param> private static void STQ(CPU cpu) { cpu.SetCoreStorageWord(cpu.AccumulatorReg.Bits_SignTo35, cpu.IndexedAddress); //Increment IC cpu.InstructionCounter.Increment(1); }
private static void SLW(CPU cpu) //Store Logical Word { //Result stores accumulator bits P,1-35 to the core storage word bits S,1-35 string fromAccum = cpu.AccumulatorReg.PBit; string fromAccum2 = cpu.AccumulatorReg.Bits_SignTo35.Substring(1, 35); string result = fromAccum + fromAccum2; cpu.SetCoreStorageWord(result, cpu.IndexedAddress); //Increment IR cpu.InstructionCounter.Increment(1); }
private static void STA(CPU cpu) //Store Address { //Result stores orignal core storage word with bits 21-35 replaced by the //accumulator 21-35 bits string fromCore = cpu.GetCoreStorageWord(cpu.IndexedAddress).Substring(0, 21); string fromAccum = cpu.AccumulatorReg.Bits_SignTo35.Substring(21, 15); string result = fromCore + fromAccum; cpu.SetCoreStorageWord(result, cpu.IndexedAddress); //Increment IRC cpu.InstructionCounter.Increment(1); }