상속: System.EventArgs
예제 #1
0
        private void memoryNotifyer_MemoryChanged(object sender, MemoryChangedEventArgs e)
        {
            // Check for any triggered hardware interrupts.
            foreach (var hardwareIrq in _hardwareIrqList.Where(irq => irq.InterruptFlagAddress == e.MemoryLocation))
            {
                if (!hardwareIrq.SpecificTrigger || e.NewValue == hardwareIrq.TriggerValue)
                {
                    if (hardwareIrq.AutoReset)
                    {
                        _memoryBus.ResetData(hardwareIrq.InterruptFlagAddress);
                    }
                    Task.Factory.StartNew(() => { hardwareIrq.Interrupt(hardwareIrq, e.MemoryLocation, e.NewValue); });
                }
            }

            // Check for any triggered software interrupts.
            foreach (var irq in _softwareIrqList.Where(irq => irq.InterruptFlagAddress == e.MemoryLocation))
            {
                OnSoftwareInterruptTriggered(irq);
            }
        }
예제 #2
0
        private void memoryNotifyer_MemoryChanged(object sender, MemoryChangedEventArgs e)
        {
            // Check for any triggered hardware interrupts.
            foreach (var hardwareIrq in _hardwareIrqList.Where(irq => irq.InterruptFlagAddress == e.MemoryLocation))
            {
                if (!hardwareIrq.SpecificTrigger || e.NewValue == hardwareIrq.TriggerValue)
                {
                    if (hardwareIrq.AutoReset)
                    {
                        _memoryBus.ResetData(hardwareIrq.InterruptFlagAddress);
                    }
                    Task.Factory.StartNew(() => { hardwareIrq.Interrupt(hardwareIrq, e.MemoryLocation, e.NewValue); });
                }
            }

            // Check for any triggered software interrupts.
            foreach (var irq in _softwareIrqList.Where(irq => irq.InterruptFlagAddress == e.MemoryLocation))
            {
                OnSoftwareInterruptTriggered(irq);
            }
        }