-
Notifications
You must be signed in to change notification settings - Fork 3
Adding the AIC Framework to your projects
TO-DO: http://dewitcher.codeplex.com/wikipage?title=First%20Operating%20System&referringTitle=Documentation
How to make your first AIC framework Kernel
It's really easy to create a Operating System using COSMOS and AIC. You can create excellent, working text-based operating systems using Cosmos, so having the AIC framework as part of your operating system builds upon this and really helps it become powerful and make it flourish.
Note: This tutorial was taken from the original Dewitcher Codeplex page, updated namespaces to reflect changes
The framework was written in C# and the majority of Cosmos operating systems are written in C# too, so in this
example C# is used.
At the beginning of your Kernel.cs, you'll want to add the using directives for the AIC framework. This would allow you to call upon methods which are part of the framework.
You'll also want to do the same in any new code file you create.
// AIC Framework
using AIC_Framework;
using AIC_Framework.Extensions;
using Console = AIC_Framework.AConsole;
using speaker = AIC_Framework.PCSpeaker;
Now that you've added the framework to the project, you'll want to actually do something with it.
In either your BeforeRun method or Run, you can add the following code.
Remember code in the BeforeRun() method is ran once, but all code in the main Run() method is ran in a loop, so think carefully before you decide to print "Hello World" an infinite number of times.
// 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);
Once you've added this code, you've started to make a functional OS kernel using the AIC framework and Cosmos. Have fun creating!
Copyright (C) 2017 Apollo-OS. All rights reserved
Copyright (C) 2012-2013 Dewitcher Team. All rights reserved