コード例 #1
0
        private void HandlePendingInterrupt()
        {
            // Lesson 5 (mRegisters.ActiveSegmentChanged = False)
            // http://ntsecurity.nu/onmymind/2007/2007-08-22.html

            if (mFlags.IF == 1 &&
                mFlags.TF == 0 &&
                !mRegisters.ActiveSegmentChanged &&
                !newPrefix &&
                picIsAvailable)
            {
                byte pendingIntNum = PIC.GetPendingInterrupt();
                if (pendingIntNum != 0xFF)
                {
                    if (mIsHalted)
                    {
                        mIsHalted = false;
                        // https://docs.oracle.com/cd/E19455-01/806-3773/instructionset-130/index.html
                        mRegisters.IP++; // Is this right??
                    }
                    HandleHardwareInterrupt(pendingIntNum);
                }
            }
        }