Пример #1
0
        protected override void BeforeRun()
        {
            Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");

            Console.WriteLine("Initializing FAT File System");
            try
            {
                CosmosVFS fs = new Sys.FileSystem.CosmosVFS();
                Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
                Console.WriteLine("Initialized FAT File System");
            } catch (InvalidCastException e)
            {
                Console.WriteLine(String.Format("FATAL ERROR! Cannot Initialize FAT File System. Error: {0}. Report this to the author immediately!", e));
                Environment.Exit(0);
            }

            Console.WriteLine("Starting File Handler");
            try
            {
                SystemPrograms.FileHandler FileHandler = new SystemPrograms.FileHandler();
                Console.WriteLine("Started File Handler");
            }
            catch (InvalidCastException e)
            {
                Console.WriteLine(String.Format("FATAL ERROR! Cannot start File Handler. Error: {0}. Report this to the author immediately!", e));
                Environment.Exit(0);
            }
        }
Пример #2
0
    protected override void BeforeRun()
    {
        Console.Clear();
        Console.WriteLine("Welcome to KratDOS");
        var fs = new Sys.FileSystem.CosmosVFS();

        Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
    }
Пример #3
0
 // init
 public static bool Initialize()
 {
     // init
     try
     {
         device = new FS.CosmosVFS();
         FS.VFS.VFSManager.RegisterVFS(device);
         return(true);
     }
     catch { return(false); }
 }
Пример #4
0
        protected override void BeforeRun()
        {
            int minram = 64;

            SetKeyboardScanMap(new DE_Standard());
            Console.Clear();
            Console.SetCursorPosition(0, 0);
            if (CPU.GetAmountOfRAM() < minram)
            {
                Console.BackgroundColor
                    = ConsoleColor.Red;
                Console.Clear();
                Console.WriteLine("Not enough memory");
                Console.WriteLine("MyoS can't run of RAM DISK");
                Console.WriteLine("Press any key to shutdown");
                Console.ReadKey();
                Cosmos.System.Power.Shutdown();
            }
            Sys.FileSystem.CosmosVFS FS = new Sys.FileSystem.CosmosVFS(); Sys.FileSystem.VFS.VFSManager.RegisterVFS(FS);
        }
Пример #5
0
        protected override void BeforeRun()
        {
            CosmosVFS fs = new Sys.FileSystem.CosmosVFS();

            Sys.FileSystem.VFS.VFSManager.RegisterVFS(fs);
            Console.Clear();
            Console.WriteLine("Cosmos booted successfully.");

            try
            {
                var fl = new DotNetFile(TestApp.file);
                var vm = new DotNetVirtualMachine(fl);
                vm.Start();

                Console.WriteLine("Program exited.");
                Console.ReadLine();
            }
            catch (Exception x)
            {
                Console.WriteLine("Caught: " + x.Message);
            }
        }