- 19 Şub 2021
- 200
- 2
Hello everyone! Today, we will going to code an operation system. Lets begin! In this series, we will develop a DOS operating system.
The programming language that we will use for program the OS:
C#
The programs and add-ons we need:
- Visual Studio 2019 // Program that we are gonna write our code.
- Cosmos // The visual studio plug-in to make an OS
- VMWare Workstation Player
Lets begin!
First, download the VS 2019 and VmWare. (You can find it on the web.)
Then, install the cosmon plug-in from here:
https://github.com/CosmosOS/Cosmos/...it_20200708/CosmosUserKit-20200708-vs2019.exe
VT:
https://www.virustotal.com/gui/file...ea1f16652a934596cb914772631b56f550f/detection
Now, create a Cosmos kernel project and begin the coding process.
Now a code page will appear on your screen like this:
Kod:
using System;
using System.Collections.Generic;
using System.Text;
using Sys = Cosmos.System;
namespace CosmosKernel1
{
public class Kernel : Sys.Kernel
{
protected override **** BeforeRun()
{
Console.WriteLine("hi");
}
protected override **** Run()
{
// We gonna write our codes Here.
}
}
}
Change the text -hi- to something that you want to append in the begin of opening
Under the // We gonna write our codes here section, paste this:
Kod:
Console.ForegroundColor = ConsoleColor.Green; // Changed our text colour to green
Console.WriteLine("System is opened, What do you want to do?");
Console.WriteLine("Help command: help");
string input;
input = Console.ReadLine();
Lets add this lines and create a help / info command:
Kod:
if (input == ("help"))
{
Console.WriteLine("help >> This menu");
Console.WriteLine("info >> Get info about [[Your OS name]] ");
}
else
{
if (input == ("info"))
{
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine("OS name: [[Your os name]] | Version: v1.0 | Credits: [[Credits]] | Web site: [[Web site of your OS]] ");
}
}
Kaynak: https://www.turkhackteam.org/genel-...istiriyoruz-1-baslangic-xale.html#post9349240
Moderatör tarafında düzenlendi: