本文整理汇总了C#中IRQContext类的典型用法代码示例。如果您正苦于以下问题:C# IRQContext类的具体用法?C# IRQContext怎么用?C# IRQContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IRQContext类属于命名空间,在下文中一共展示了IRQContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IRQ
private static void IRQ(uint irq, ref IRQContext aContext)
{
var xCallback = mIRQ_Handlers[irq];
if (xCallback != null)
{
HMI.GCMonitor();
xCallback(ref aContext);
HMI.GCFreeAll();
}
}
示例2: HandleInterrupt_12
public static void HandleInterrupt_12(ref IRQContext aContext)
{
HandleException(aContext.EIP, "Machine Check Exception", "Machine Check Exception", ref aContext);
}
示例3: HandleException
private static void HandleException(uint aEIP, string aDescription, string aName, ref IRQContext ctx, uint lastKnownAddressValue = 0)
{
// At this point we are in a very unstable state.
// Try not to use any Cosmos routines, just
// report a crash dump.
const string xHex = "0123456789ABCDEF";
uint xPtr = ctx.EIP;
// we're printing exception info to the screen now:
// 0/0: x
// 1/0: exception number in hex
unsafe
{
byte* xAddress = (byte*)0xB8000;
PutErrorChar(0, 00, ' ');
PutErrorChar(0, 01, '*');
PutErrorChar(0, 02, '*');
PutErrorChar(0, 03, '*');
PutErrorChar(0, 04, ' ');
PutErrorChar(0, 05, 'C');
PutErrorChar(0, 06, 'P');
PutErrorChar(0, 07, 'U');
PutErrorChar(0, 08, ' ');
PutErrorChar(0, 09, 'E');
PutErrorChar(0, 10, 'x');
PutErrorChar(0, 11, 'c');
PutErrorChar(0, 12, 'e');
PutErrorChar(0, 13, 'p');
PutErrorChar(0, 14, 't');
PutErrorChar(0, 15, 'i');
PutErrorChar(0, 16, 'o');
PutErrorChar(0, 17, 'n');
PutErrorChar(0, 18, ' ');
PutErrorChar(0, 19, 'x');
PutErrorChar(0, 20, xHex[(int)((ctx.Interrupt >> 4) & 0xF)]);
PutErrorChar(0, 21, xHex[(int)(ctx.Interrupt & 0xF)]);
PutErrorChar(0, 22, ' ');
PutErrorChar(0, 23, '*');
PutErrorChar(0, 24, '*');
PutErrorChar(0, 25, '*');
PutErrorChar(0, 26, ' ');
if (lastKnownAddressValue != 0)
{
PutErrorString(1, 0, "Last known address: 0x");
PutErrorChar(1, 22, xHex[(int)((lastKnownAddressValue >> 28) & 0xF)]);
PutErrorChar(1, 23, xHex[(int)((lastKnownAddressValue >> 24) & 0xF)]);
PutErrorChar(1, 24, xHex[(int)((lastKnownAddressValue >> 20) & 0xF)]);
PutErrorChar(1, 25, xHex[(int)((lastKnownAddressValue >> 16) & 0xF)]);
PutErrorChar(1, 26, xHex[(int)((lastKnownAddressValue >> 12) & 0xF)]);
PutErrorChar(1, 27, xHex[(int)((lastKnownAddressValue >> 8) & 0xF)]);
PutErrorChar(1, 28, xHex[(int)((lastKnownAddressValue >> 4) & 0xF)]);
PutErrorChar(1, 29, xHex[(int)(lastKnownAddressValue & 0xF)]);
}
}
// lock up
while (true)
{
}
}
示例4: HandleInterrupt_0E
public static void HandleInterrupt_0E(ref IRQContext aContext)
{
HandleException(aContext.EIP, "Page Fault Exception", "Page Fault Exception", ref aContext);
}
示例5: HandleInterrupt_10
public static void HandleInterrupt_10(ref IRQContext aContext)
{
HandleException(aContext.EIP, "x87 Floating Point Exception", "Coprocessor Fault Exception", ref aContext);
}
示例6: HandleInterrupt_09
public static void HandleInterrupt_09(ref IRQContext aContext)
{
HandleException(aContext.EIP, "Coprocessor Segment Overrun Exception", "Coprocessor Segment Overrun Exception", ref aContext);
}
示例7: HandleInterrupt_0B
public static void HandleInterrupt_0B(ref IRQContext aContext)
{
HandleException(aContext.EIP, "Segment Not Present", "Segment Not Present", ref aContext);
}
示例8: HandleInterrupt_30
// Interrupt 0x30, enter VMM
public static void HandleInterrupt_30(ref IRQContext aContext)
{
if (Interrupt30 != null)
{
Interrupt30(ref aContext);
}
}
示例9: HandleInterrupt_35
public static void HandleInterrupt_35(ref IRQContext aContext)
{
aContext.EAX *= 2;
aContext.EBX *= 2;
aContext.ECX *= 2;
aContext.EDX *= 2;
}
示例10: HandleInterrupt_27
public static void HandleInterrupt_27(ref IRQContext aContext)
{
IRQ(0x27, ref aContext);
Global.PIC.EoiMaster();
}
示例11: HandleInterrupt_2F
//IRQ 15 - Secondary IDE
public static void HandleInterrupt_2F(ref IRQContext aContext)
{
IRQ(0x2F, ref aContext);
Global.PIC.EoiSlave();
}
示例12: HandleInterrupt_Default
public static void HandleInterrupt_Default(ref IRQContext aContext)
{
if (aContext.Interrupt >= 0x20 && aContext.Interrupt <= 0x2F)
{
if (aContext.Interrupt >= 0x28)
{
Global.PIC.EoiSlave();
}
else
{
Global.PIC.EoiMaster();
}
}
}
示例13: IRQ
private static void IRQ(uint irq, ref IRQContext aContext)
{
var xCallback = mIRQ_Handlers[irq];
if (xCallback != null)
{
xCallback(ref aContext);
}
}
示例14: HandleInterrupt_35
public static void HandleInterrupt_35(ref IRQContext aContext)
{
Global.Dbg.SendMessage("Interrupts", "Interrupt 35 handler");
aContext.EAX *= 2;
aContext.EBX *= 2;
aContext.ECX *= 2;
aContext.EDX *= 2;
}
示例15: HandleInterrupt_06
public static void HandleInterrupt_06(ref IRQContext aContext)
{
// although mLastKnownAddress is a static, we need to get it here, any subsequent calls will change the value!!!
var xLastKnownAddress = mLastKnownAddress;
HandleException(aContext.EIP, "Invalid Opcode", "EInvalidOpcode", ref aContext, xLastKnownAddress);
}