Esempio n. 1
0
        public void NextInstructionDebug()
        {
            string dasm;

            Disassemble8086.DisassembleNext(_bus.GetNext6Bytes(), 0, 0, out dasm);
            Debug.WriteLine(_bus.CS.ToString("X4") + ":" + _bus.IP.ToString("X4") + " " + dasm);
            NextInstruction();
        }
Esempio n. 2
0
        private void UpdateDisplay()
        {
            txtAX.Text = RegToString(_cpu.EU.Registers.AX);
            txtBX.Text = RegToString(_cpu.EU.Registers.BX);
            txtCX.Text = RegToString(_cpu.EU.Registers.CX);
            txtDX.Text = RegToString(_cpu.EU.Registers.DX);
            txtSP.Text = RegToString(_cpu.EU.Registers.SP);
            txtBP.Text = RegToString(_cpu.EU.Registers.BP);
            txtSI.Text = RegToString(_cpu.EU.Registers.SI);
            txtDI.Text = RegToString(_cpu.EU.Registers.DI);
            txtCS.Text = RegToString(_cpu.Bus.CS);
            txtDS.Text = RegToString(_cpu.Bus.DS);
            txtES.Text = RegToString(_cpu.Bus.ES);
            txtSS.Text = RegToString(_cpu.Bus.SS);
            txtIP.Text = RegToString(_cpu.Bus.IP);

            lblTF.BackColor = FlagToColor(_cpu.EU.CondReg.TrapFlag);
            lblDF.BackColor = FlagToColor(_cpu.EU.CondReg.DirectionFlag);
            lblIF.BackColor = FlagToColor(_cpu.EU.CondReg.InterruptEnable);
            lblOF.BackColor = FlagToColor(_cpu.EU.CondReg.OverflowFlag);
            lblSF.BackColor = FlagToColor(_cpu.EU.CondReg.SignFlag);
            lblZF.BackColor = FlagToColor(_cpu.EU.CondReg.ZeroFlag);
            lblAF.BackColor = FlagToColor(_cpu.EU.CondReg.AuxCarryFlag);
            lblPF.BackColor = FlagToColor(_cpu.EU.CondReg.ParityFlag);
            lblCF.BackColor = FlagToColor(_cpu.EU.CondReg.CarryFlag);

            string dasm;
            int    bytes = (int)Disassemble8086.DisassembleNext(_cpu.Bus.GetNext6Bytes(), 0, 0, out dasm);

            lblDasm.Text = dasm;

            lblNext.Text = "";
            byte[] data = _cpu.Bus.GetNextIPBytes(bytes);
            for (int ii = 0; ii < bytes; ii++)
            {
                lblNext.Text += string.Format("{0:X2}", data[ii]);
                lblNext.Text += " ";
            }

            lblInstrCount.Text = _cpu.EU.Stats.InstructionCount.ToString();
        }
Esempio n. 3
0
 public void NextInstruction(out string dasm)
 {
     Disassemble8086.DisassembleNext(_bus.GetNext6Bytes(), 0, 0, out dasm);
     NextInstruction();
 }