CosmosOS

Cosmos[1], również CosmosOS (skrót od "C# Open Source Managed Operating System") – toolkit do stworzenia własnego systemu operacyjnego za pomocą dowolnego języka .NET. Cosmos powstał z inicjatywy Chada Z. Howera (Kudzu), a pierwsze linie kodu zostały napisane przez Chada Z. Howera i Matthijsa ter Woorda w 1995 roku, wtedy pod nazwą CHAOS (skrót od Chad Hower's Advanced Operating System)[2].

Działanie

Cosmos do utworzenia wyjściowego pliku *.bin używa X# – asemblera x86 wysokiego poziomu, oraz IL2CPU – programu zamieniającego kod Intermediate Language do kodu X#, który następnie jest zamieniany na kod zrozumiały dla NASM. NASM tworzy plik *.bin systemu operacyjnego, plik ISO z bootloaderem ISOLINUX, plikami z konfiguracją oraz plikiem *.bin z systemem. Oprócz tego jest tworzony również folder o nazwie ISO, z zawartością identyczną jak plik ISO.

System

System operacyjny stworzony z użyciem Cosmos może obsługiwać mysz, system plików FAT, urządzenia pamięci masowej, pliki ELF, wielowątkowość, tryb graficzny oraz wiele innych. Domyślnie system pracuje w trybie tekstowym 80x25, kolorem tekstu jest biały, a tła - czarny.

Domyślny kod kernela Cosmos:

using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;

namespace CosmosKernel2
{
    public class Kernel : Sys.Kernel
    {
        protected override void BeforeRun()
        {
            Console.WriteLine("Cosmos booted successfully. Type a line of text to get it echoed back.");
        }

        protected override void Run()
        {
            Console.Write("Input: ");
            var input = Console.ReadLine();
            Console.Write("Text typed: ");
            Console.WriteLine(input);
        }
    }
}

Przypisy

  1. https://gocosmos.org
  2. About - COSMOS [online], gocosmos.org [dostęp 2024-04-22] (ang.).

Linki zewnętrzne

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
Kembali kehalaman sebelumnya