Your first dewitcher Kernel

It's really easy to create a Operating System using COSMOS and dewitcher.
COSMOS itself is a really powerful tool, but together with dewitcher you can break the regular grid!

You can easily create a fully working text-based operating system using dewitcher.

Note: Updated to the newest dewitcher Build

C# Example

// .NET
using System;
using System.Collections.Generic;

// COSMOS
using Sys = Cosmos.System;

// dewitcher Framework
using dewitcher;
using dewitcher.Extensions;
using Console = dewitcher.Console;
using speaker = dewitcher.Audio.PCSpeaker;

namespace YourOS
{
    public class Kernel : Sys.Kernel
    {
        protected override void Run()
        {
            // Play a sound for 500 milliseconds
            speaker.Beep(speaker.Notes.C4, 500);

            // Write 'Hello World' in blue
            Console.WriteLine("Hello World", ConsoleColor.Blue);

            // Write 'Hello World' in red and horizontal centered
            Console.WriteLine("Hello World", ConsoleColor.Red, true);

            // Wait 3 seconds
            // IMPROVED! Now using the PIT
            this.SleepSeconds(3);

            // Shutdown
            this.Shutdown();
        }
    }
}

Last edited Mar 22, 2013 at 7:09 PM by SplittyDev, version 7

Comments

No comments yet.