protected override void BeforeRun() { Console.Clear(); Bootscreen.Show("AIC Demo!", Bootscreen.Effect.Matrix, ConsoleColor.Green, 3); Console.Clear(); menu.Reset(); }
public override void Execute() { Console.Clear(); Console.WriteLine("Hello World!"); KernelExtensions.PressAnyKey(); // Place the code that should be executed here }
public static void RollDown(uint mspause) { for (int i = 0; i < 26; i++) { for (int j = 0; j < 81; j++) { AConsole.Write(" "); AIC.Core.PIT.SleepMilliseconds(mspause); } } AConsole.Clear(); }
/// <summary> /// Initiates a Bluescreen. /// </summary> /// <param name="error">Error title or exception name</param> /// <param name="description">Error description</param> /// <param name="critical">Critical error?</param> public static void Init( string error = "Something went wrong!", string description = "Unknown exception", bool critical = false) { DrawOOPS(); if (description.Length + 33 < System.Console.WindowHeight) { System.Console.CursorTop = 2; System.Console.CursorLeft = 33; ConsoleColor errcolor = ConsoleColor.White; if (critical) { errcolor = ConsoleColor.Red; } AConsole.WriteLineEx(error, errcolor, ConsoleColor.Blue); AConsole.CursorTop = 4; AConsole.CursorLeft = 70; AConsole.WriteLineEx(description, ConsoleColor.White, ConsoleColor.Blue); } else { AConsole.CursorTop = 12; AConsole.CursorLeft = 2; ConsoleColor errcolor = ConsoleColor.White; if (critical) { errcolor = ConsoleColor.Red; } AConsole.WriteLineEx(error, errcolor, ConsoleColor.Blue); AConsole.CursorTop = 14; AConsole.CursorLeft = 2; AConsole.WriteLineEx(description, ConsoleColor.White, ConsoleColor.Blue); } if (!critical) { AConsole.CursorTop = AConsole.WindowHeight - 1; AConsole.WriteEx("Press the [Enter]-key to resume", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.ReadLine(); AConsole.Clear(); } else { AConsole.CursorTop = AConsole.WindowHeight - 4; AConsole.WriteLineEx("Press the [Enter]-key to shutdown", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.WriteLineEx("If it doesn't work, press the RESET-button on your computer.", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.ReadLine(); ACPI.Shutdown(); } }
public static void Panic() { AConsole.Clear(); AConsole.Fill(ConsoleColor.Red); AConsole.CursorTop = 2; AConsole.WriteLineEx("KERNEL PANIC", ConsoleColor.White, ConsoleColor.Red, true); AConsole.WriteLine("\n"); string message = "CRITICAL KERNEL EXCEPTION\nPLEASE CONTACT YOUR SOFTWARE MANUFACTURER"; AConsole.WriteLineEx(message, ConsoleColor.White, ConsoleColor.Red, true); // Enter an infinite loop while (true) { } }
public static void Init(Exception ex, bool critical = false) { DrawOOPS(); if (ex.Message.Length + 33 < AConsole.WindowHeight) { AConsole.CursorTop = 2; AConsole.CursorLeft = 33; ConsoleColor errcolor = ConsoleColor.White; if (critical) { errcolor = ConsoleColor.Red; } //AConsole.WriteLineEx(ex.Source, errcolor, ConsoleColor.Blue); AConsole.CursorTop = 3; AConsole.CursorLeft = 70; AConsole.WriteLineEx(ex.Message, ConsoleColor.White, ConsoleColor.Blue); } else { AConsole.CursorTop = 12; AConsole.CursorLeft = 2; ConsoleColor errcolor = ConsoleColor.White; if (critical) { errcolor = ConsoleColor.Red; } //AConsole.WriteLineEx(ex.Source, errcolor, ConsoleColor.Blue); AConsole.CursorTop = 13; AConsole.CursorLeft = 2; AConsole.WriteLineEx(ex.Message, ConsoleColor.White, ConsoleColor.Blue); } if (!critical) { AConsole.CursorTop = AConsole.WindowHeight - 3; AConsole.WriteEx("Press the [Enter]-key to resume", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.ReadLine(); AConsole.Clear(); } else { AConsole.CursorTop = AConsole.WindowHeight - 4; AConsole.WriteEx("Press the [Enter]-key to shutdown", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.WriteEx("If it doesn't work, press the RESET-button on your computer.", ConsoleColor.White, ConsoleColor.Blue); AConsole.CursorTop++; AConsole.ReadLine(); ACPI.Shutdown(); } }
/// <summary> /// Kernel Panic /// </summary> public static void Panic(string err, string desc, string lka, ref Cosmos.Core.INTs.IRQContext aContext) { AConsole.Clear(); AConsole.Fill(ConsoleColor.Black); AConsole.CursorTop = 2; AConsole.WriteLineEx("kpanic occurred at :" + lka, ConsoleColor.Black, ConsoleColor.White); AConsole.WriteLineEx("Error: " + err, ConsoleColor.Black, ConsoleColor.White); AConsole.WriteLineEx("Description: " + desc, ConsoleColor.Black, ConsoleColor.White); AConsole.WriteLine("\n"); AConsole.WriteLine("Debug info:"); AConsole.WriteLine("\n"); AConsole.WriteLine("eip: " + aContext.EIP); AConsole.WriteLine("eax: " + aContext.EAX + " edx: " + aContext.EDX + " ecx: " + aContext.ECX + " ebx: " + aContext.EBX); AConsole.WriteLine("esi: " + aContext.ESI + " edi: " + aContext.EDI + " ebp: " + aContext.EBP + " esp: " + aContext.ESP); // Enter an infinite loop while (true) { } }
public override void Execute() { Console.Clear(); KernelExtensions.PressAnyKey("Press any key to start a test Stop Error"); Console.WriteLine(breakme().ToString()); }
public override void Execute() { Bootscreen.Show("AIC Demo!", Bootscreen.Effect.Matrix, ConsoleColor.Green, 2); Console.Clear(); }
public override void Execute() { Bootscreen.Show("AIC Demo!", Bootscreen.Effect.SlideFromLeft, ConsoleColor.Green, 1); Console.Clear(); }
/// <summary> /// Shows the BootScreen and a specified effect /// </summary> /// <param name="OSname"></param> /// <param name="efx"></param> /// <param name="color"></param> /// <param name="ms_sleep"></param> public static void Show(string OSname, Effect efx, ConsoleColor color, int ms_sleep) { debugger.Send("Bootscreen.Show"); if (ms_sleep % 2 == 1) { ms_sleep++; } switch (efx) { case Effect.SlideFromLeft: debugger.Send("slide-from-left"); for (int i = 0; i < ((AConsole.WindowWidth / 2) - (OSname.Length / 2)); i++) { AConsole.Clear(); AConsole.CursorLeft = i; string fill = ""; for (int x = 0; x < i; x++) { fill += " "; } AConsole.Write(fill); AConsole.Write(OSname, color, false, true); RTC.Sleep(ms_sleep); } break; case Effect.SlideFromRight: debugger.Send("slide-from-right"); for (int i = (AConsole.WindowWidth - OSname.Length); i > ((AConsole.WindowWidth / 2) - (OSname.Length / 2)); i--) { AConsole.Clear(); AConsole.CursorLeft = i; AConsole.Write(OSname, color, false, true); RTC.Sleep(ms_sleep); } break; case Effect.SlideFromTop: debugger.Send("slide-from-top"); for (int i = 0; i < (AConsole.WindowHeight / 2); i++) { AConsole.Clear(); AConsole.CursorTop = i; AConsole.WriteLine(OSname, color, true, false); RTC.Sleep(ms_sleep); } break; case Effect.SlideFromBottom: debugger.Send("slide-from-bottom"); for (int i = (AConsole.WindowHeight - 1); i > (AConsole.WindowHeight / 2); i--) { AConsole.Clear(); AConsole.CursorTop = i; AConsole.WriteLine(OSname, color, true, false); RTC.Sleep(ms_sleep); } break; case Effect.Typewriter: debugger.Send("typewriter"); AConsole.CursorLeft = ((AConsole.WindowWidth / 2) - (OSname.Length / 2)); foreach (char chr in OSname) { AConsole.Write(chr.ToString(), color, false, true); RTC.Sleep(ms_sleep); } break; case Effect.Matrix: debugger.Send("matrix"); int sec1 = AIC.Hardware.RTC.Now.Second; int sec2 = sec1; do { sec2 = AIC.Hardware.RTC.Now.Second; } while (sec1 == sec2); int sec3; if (sec2 <= 56) { sec3 = sec2 + 3; } else if (sec2 == 57) { sec3 = 1; } else if (sec2 == 58) { sec3 = 2; } else if (sec2 == 59) { sec3 = 3; } else { sec3 = 3; } int tmr = 0; int tmrx = 0; for (int i = 0; i < 10; i++) { for (int ih = 0; ih < AConsole.WindowHeight; ih++) { for (int iw = 0; iw < AConsole.WindowWidth; iw++) { if (tmr == 11) { tmr = 0; } if (tmrx == 4) { tmrx = 0; } tmr++; if (tmr == 0) { AConsole.Write("#", ConsoleColor.Magenta); } if (tmrx == 3) { AConsole.Write("*", ConsoleColor.Green); } if (tmr == 2) { AConsole.Write(";", ConsoleColor.Red); ++tmrx; } if (tmrx == 1) { AConsole.Write("+", ConsoleColor.Yellow); } if (tmr == 4) { AConsole.Write("~", ConsoleColor.Blue); ++tmrx; } if (tmrx == 2) { AConsole.Write("&", ConsoleColor.Cyan); } AConsole.Write(OSname, ConsoleColor.White, true, true); } } } break; } }