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); } }