From da0db70154ddfbf30c82a8726abc8ec4bb0ab7c1 Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Thu, 5 Feb 2026 23:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=A9=E8=9B=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kernel.cs | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/Kernel.cs b/Kernel.cs index 019b89e..388b5ac 100644 --- a/Kernel.cs +++ b/Kernel.cs @@ -20,22 +20,6 @@ namespace CMLeonOS { private static CMLeonOS.Logger.Logger _logger = CMLeonOS.Logger.Logger.Instance; - public void ShowError(string error) - { - _logger.Error("Kernel", error); - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine($"{error}"); - Console.ResetColor(); - } - - public void ShowSuccess(string success) - { - _logger.Success("Kernel", success); - Console.ForegroundColor = ConsoleColor.Green; - Console.WriteLine($"{success}"); - Console.ResetColor(); - } - // 创建全局CosmosVFS实例 public static Sys.FileSystem.CosmosVFS fs = new Sys.FileSystem.CosmosVFS(); public static Shell shell; @@ -183,6 +167,32 @@ namespace CMLeonOS // 检查并执行启动脚本 ExecuteStartupScript(); + + if (System.IO.File.Exists("0:\\system\\zen")) + { + Console.WriteLine("====================================="); + Console.WriteLine(" The Zen of CMLeonOS "); + Console.WriteLine("(For the dreamer at 0x100000)"); + Console.WriteLine("====================================="); + Console.WriteLine(); + Console.WriteLine("Memory has bounds, but thought breaks all frame,"); + Console.WriteLine("Bare metal no layers, code bears its name."); + Console.WriteLine("A boot's brief spark, all systems ignite,"); + Console.WriteLine("Errors in registers, roots in code's flight."); + Console.WriteLine(); + Console.WriteLine("Simplicity beats the redundant's vain race,"); + Console.WriteLine("Stability outshines the radical's chase."); + Console.WriteLine("Hardware ne'er lies, code holds the wise key,"); + Console.WriteLine("Interrupts not chaos, scheduling sets free."); + Console.WriteLine(); + Console.WriteLine("Binary's cold shell, no breath, no soul,"); + Console.WriteLine("Kernel's warm core, makes the machine whole."); + Console.WriteLine("From zero to one, the boot path we tread,"); + Console.WriteLine("From one to forever, guard every thread."); + Console.WriteLine(); + Console.WriteLine("Build the kernel in zen, step by step, line by line,"); + Console.WriteLine("A bug brings new wake, a line brings new shine."); + } // 运行Shell(用户可以输入exit退出) _logger.Info("Kernel", "Starting Shell");