Exemplo n.º 1
0
 private void ExecuteRegisterInstruction(CpuInstruction instruction, UInt16 reg1Value, UInt16 reg2Value)
 {
     // レジスタに値を設定し、命令を実行します。
     m_registerSet.GR[R1].Value = reg1Value;
     m_registerSet.GR[R2].Value = reg2Value;
     instruction.Execute(R1, R2, m_registerSet, m_memory);
 }
Exemplo n.º 2
0
        private void ExecuteEaContentsInstruction(CpuInstruction instruction, UInt16 regValue, UInt16 eaContents)
        {
            // 命令語の次のアドレスに adr, 実効アドレスの内容、GRx にオフセットの値を書き込みます。
            m_memory.Write(NextAddress, Adr);
            m_memory.Write(EffectiveAddress, eaContents);
            m_registerSet.GR[X].Value = Offset;

            // レジスタと PR に値を設定し、命令を実行します。
            m_registerSet.GR[R].Value = regValue;
            m_registerSet.PR.Value    = NextAddress;
            instruction.Execute(R, X, m_registerSet, m_memory);
        }