Skip to content

Commit

Permalink
Update main.html
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeFence authored Dec 12, 2023
1 parent 5aa2566 commit 974d935
Showing 1 changed file with 30 additions and 220 deletions.
250 changes: 30 additions & 220 deletions main.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@

<!DOCTYPE html>
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Getting Started </title>
<title>Welcome to the Official Cosmos Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Getting Started ">
<meta name="title" content="Welcome to the Official Cosmos Documentation ">
<meta name="generator" content="docfx 2.59.4.0">

<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="styles/docfx.vendor.css">
<link rel="stylesheet" href="styles/docfx.css">
<link rel="stylesheet" href="styles/main.css">
<meta property="docfx:navrel" content="toc">
<meta property="docfx:tocrel" content="toc">


Expand All @@ -34,8 +33,8 @@
<span class="icon-bar"></span>
</button>

<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../images/logo.png" alt="">
<a class="navbar-brand" href="index.html">
<img id="logo" class="svg" src="images/logo.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
Expand All @@ -47,19 +46,19 @@

<ul class="nav level1 navbar-nav">
<li>
<a href="../index.html" title="Home">Home</a>
<a href="index.html" title="Home">Home</a>
</li>
<li>
<a href="../install.html" title="Install">Install</a>
<a href="install.html" title="Install">Install</a>
</li>
<li>
<a href="https://gocosmos.org" title="Cosmos Website">Cosmos Website</a>
</li>
<li>
<a href="../articles/GettingStarted.html" title="Articles">Articles</a>
<a href="articles/GettingStarted.html" title="Articles">Articles</a>
</li>
<li>
<a href="../api/Cosmos.Build.Common.html" title="API Documentation">API Documentation</a>
<a href="api/Cosmos.Build.Common.html" title="API Documentation">API Documentation</a>
</li>
</ul> </div>
</div>
Expand All @@ -74,209 +73,20 @@
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div>
<div class="sidefilter">
<form class="toc-filter">
<span class="glyphicon glyphicon-filter filter-icon"></span>
<input type="text" id="toc_filter_input" placeholder="Enter here to filter..." onkeypress="if(event.keyCode==13) {return false;}">
</form>
</div>
<div class="sidetoc">
<div class="toc" id="toc">

<ul class="nav level1">
<li class="active">
<a href="GettingStarted.html" title="Getting Started" class="active">Getting Started</a>
</li>
<li class="">
<a href="Compiler/il2cpu.html" title="Compiler" class="">Compiler</a>
</li>
<li class="">
<a href="Changelog.html" title="Change Log" class="">Change Log</a>
</li>
<li class="">
<span class="expand-stub"></span>
<a class="">Debugger</a>

<ul class="nav level2">
<li class="">
<a href="Debugger/DebugCommands.html" title="Debug Commands" class="">Debug Commands</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a class="">Installation</a>

<ul class="nav level2">
<li class="">
<a href="Installation/DevKit.html" title="Dev Kit" class="">Dev Kit</a>
</li>
<li class="">
<a href="Installation/Running.html" title="Running" class="">Running</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a class="">Kernel</a>

<ul class="nav level2">
<li class="">
<a href="Kernel/Levels.html" title="Levels" class="">Levels</a>
</li>
<li class="">
<a href="Kernel/Plugs.html" title="Plugs" class="">Plugs</a>
</li>
<li class="">
<a href="Kernel/Startup.html" title="Startup" class="">Startup</a>
</li>
<li class="">
<a href="Kernel/OnBoot.html" title="OnBoot" class="">OnBoot</a>
</li>
<li class="">
<a href="Kernel/CGS.html" title="Graphics" class="">Graphics</a>
</li>
<li class="">
<a href="Kernel/VFS.html" title="Virtual File System" class="">Virtual File System</a>
</li>
<li class="">
<a href="Kernel/Network.html" title="Network" class="">Network</a>
</li>
<li class="">
<a href="Kernel/ManifestResouceStream.html" title="Resource Files" class="">Resource Files</a>
</li>
<li class="">
<a href="Kernel/MemoryManagement.html" title="Memory Management and Garbage Collection" class="">Memory Management and Garbage Collection</a>
</li>
<li class="">
<a href="Kernel/Audio.html" title="Audio" class="">Audio</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a class="">Reference</a>

<ul class="nav level2">
<li class="">
<a href="Reference/x86.html" title="x86" class="">x86</a>
</li>
</ul> </li>
<li class="">
<span class="expand-stub"></span>
<a class="">Tests</a>

<ul class="nav level2">
<li class="">
<a href="Tests/TestRunner.html" title="Test Runner" class="">Test Runner</a>
</li>
</ul> </li>
</ul> </div>
</div>
</div>
</div>
</div>
<div class="article row grid-right">
<div class="article row grid">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="getting-started">Getting Started</h1>
<h1 id="welcome-to-the-official-cosmos-documentation">Welcome to the Official Cosmos Documentation</h1>

<h2 id="introducing-cosmos">Introducing Cosmos</h2>
<p>Cosmos (C# Open Source Managed Operating System) is an operating system
development kit which uses Visual Studio as its development environment.
Despite C# in the name any .NET based language can be used including VB.NET,
Fortran, Delphi Prism, IronPython, F# and more. Cosmos itself and the kernel
routines are primarily written in C#, and thus the Cosmos name. Besides that,
NOSMOS (.NET Open Source Managed Operating System) sounds stupid.</p>
<p>Cosmos is not an operating system in the traditional sense, but instead it is
an &quot;Operating System Kit&quot;, or as I like to say &quot;Operating System Legos&quot;.
Cosmos lets you create operating systems just as Visual Studio and C# normally
let you create applications. Most users can write and boot their own operating
system in just a few minutes, all using Visual Studio. You can debug your operating system directly from Visual
Studio using breakpoints.</p>
<p>Cosmos is available in two distributions, the developer kit (dev kit), and the user kit. The dev kit is designed for users who want to work on Cosmos itself.
The user kit is designed for those who are interested in building their own
operating system and doing some Cosmos work. The dev kit might be thought of
as the Cosmos SDK. Most users should start off with the user kit as it is not
so overwhelming like the dev kit. This article focuses on the user kit.</p>
<h2 id="writing-your-first-operating-system">Writing your first Operating System</h2>
<p>Create a new project as you would any C# project, but select Cosmos as the project type.</p>
<p><img src="images/SNAG-0000.png" alt=""></p>
<p>A starter project will be created. It looks very much like a standard C#
console application.</p>
<p><img src="images/SNAG-0001.png" alt=""></p>
<p>Kernel.cs contains the boot and execution code. Instead of seeing a Windows
console window, you will see the following:</p>
<p><img src="images/SNAG-0003.png" alt=""></p>
<p>This is your operating system running in VMware Player! Cosmos can of course
also be booted in VMware Workstation, Hyper-V, Virtual PC, Bochs, or on real
hardware. But by default Cosmos uses VMware Player because it is both free,
and reliable. Cosmos can even debug in Visual Studio, even when running on
another machine.</p>
<h2 id="integrated-debugging">Integrated Debugging</h2>
<p>Debugging is a major issue with operating system development. The Cosmos team
was not content enough to simply conquer building and deployment, we want to
make developing operating system as easy as developing Windows applications.
Debugging a Cosmos based operating system should feel very familiar to you.
Lets modify our project a little bit to show the effect, and set a breakpoint.
<strong>Note that the debugger only works in Visual Studio, and not Linux</strong></p>
<p><img src="images/SNAG-0005.png" alt=""></p>
<p>Now run the project again.</p>
<p><img src="images/SNAG-0007.png" alt=""></p>
<p>Note that the execution stopped at &quot;One&quot;? That is becuase in Visual Studio our
project has stopped on a breakpoint. Simply press F5 to continue just as you
would in a normal application!</p>
<p>In addition to breakpoints Cosmos also supports step into (F11) as well. Trace
over (F10) is not supported yet.</p>
<h2 id="debugger-communication">Debugger Communication</h2>
<p>The debugger uses the serial port to communicate. Because of this, debugging
only works wtih virtualization environments that support serial ports such as
VMware. QEMU supports serial ports as well, but its serial port implementation
is seriously broken on Windows and makes debugging impossible using QEMU. To
debug on real hardware, you must use a physical serial cable. In the future
Cosmos will also support debugging over Ethernet.</p>
<h2 id="extra-debugging">Extra Debugging</h2>
<p>Cosmos supports some explicit methods that can be used to communicate with the
debugger and use additional functionality. It is accessed using the Debugger
class in the Cosmos.Debug namespace in the Cosmos.Kernel assembly. This
assembly is used by all Cosmos projects.</p>
<h2 id="code-based-breakpoints">Code Based Breakpoints</h2>
<pre><code>mDebugger.Break();
</code></pre>
<p>Break can be used to issue a code based break. Visual Studio will break on the
line after this statement.</p>
<p><img src="images/SNAG-0006.png" alt=""></p>
<p>Since Cosmos does not support conditional breakpoints in the IDE yet, code
base breaks are very useful for implementing such. For example:</p>
<pre><code>if (x == 5) {
mDebugger.Break();
}
</code></pre>
<p>Or you can use the .NET BCL debugger break:</p>
<pre><code>System.Diagnostics.Debugger.Break();
</code></pre>
<p>Both functions will produce the same result.</p>
<h2 id="debug-output">Debug Output</h2>
<p>Debug strings can be output to the debug window of the host. Because Cosmos
does not support watches yet, this functionality can be very useful for
watching variable values and for performing tracing without breakpoints.</p>
<pre><code>mDebugger.Send(&quot;Hello from Cosmos!&quot;);
</code></pre>
<p>When this line is executed, it will send a message over the debugging channel
and it will appear in the Visual Studio output window.</p>
<p><img src="images/SNAG-0008.png" alt=""></p>
<h2 id="whats-the-catch">What's the catch?</h2>
<p>There really is no catch. Everything we've shown here is functioning as seen.
No mockups were used. However we still have a lot of work to go. Items of
interest that are on our current task list include threads and networking.
We have prototypes and experiments for each, but none have been rolled into
the mainline Cosmos development as of yet.</p>
<h2 id="obtaining-cosmos">Obtaining Cosmos</h2>
<ul>
<li>Cosmos Website - <a href="http://www.GoCosmos.org">http://www.GoCosmos.org</a></li>
<li>Source Code - Both dev kit and user kit - <a href="http://github.com/CosmosOS/Cosmos/">http://github.com/CosmosOS/Cosmos/</a></li>
</ul>
<p>If you're new to Cosmos, welcome! Before you get stuck in the API documentation, we highly recommend you visit the website linked at the bottom.</p>
<p>The Articles section of this website includes some articles which have been written many years ago for websites such as <a href="http://www.codeproject.com">www.codeproject.com</a> and are kept for archival purposes. These discuss elements such as the Cosmos Virtual File System. We prefer newcomers who want to develop their own operating systems to read the API documentation while we update these articles to comply with the current Cosmos project.</p>
<p>For projects using the VFS directly, we recommend you use System.IO methods where possible. This is because these were written before much progress was made making .NET assemblies usable</p>
<p>For the up-to-date API documentation generated from the master branch, please visit the <a href="https://cosmosos.github.io/api/Cosmos.Build.Tasks.html">Cosmos API Documentation</a></p>
<p>If you're looking for general information about Cosmos e.g. our goals and various links to chat with us or for help with using Cosmos that can't be answered with existing documentation, please visit the <a href="https://gocosmos.org">Cosmos website</a></p>
<p>If you need a translation for this documentation, click <a href="https://cosmosos-github-io.translate.goog/?_x_tr_sl=auto&amp;_x_tr_tl=en&amp;_x_tr_hl=en&amp;_x_tr_pto=wapp">here</a>.</p>
<p>You can find the latest and previous build statuses on <a href="https://ci.appveyor.com/project/CosmosOS/cosmos">AppVeyor</a></p>
<p><a href="https://ci.appveyor.com/project/CosmosOS/cosmos/branch/master"><img src="https://ci.appveyor.com/api/projects/status/kust7g5dlnykhkaf/branch/master?svg=true" alt="Build status"></a><br>
<a href="https://discord.com/invite/kwtBwv6jhD"><img src="https://img.shields.io/discord/833970409337913344" alt="Join the chat at (https://discord.com/invite/kwtBwv6jhD"></a></p>
</article>
</div>

Expand All @@ -285,7 +95,7 @@ <h2 id="obtaining-cosmos">Obtaining Cosmos</h2>
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/CosmosOS/Cosmos/blob/master/Docs/articles/GettingStarted.md/#L1" class="contribution-link">Improve this Doc</a>
<a href="https://github.com/CosmosOS/Cosmos/blob/master/Docs/index.md/#L1" class="contribution-link">Improve this Doc</a>
</li>
</ul>
</div>
Expand Down Expand Up @@ -337,11 +147,11 @@ <h5>In This Article</h5>
</div>
</div>
</div>
<script type="text/javascript" src="../styles/toggle-theme.js"></script>
<script type="text/javascript" src="styles/toggle-theme.js"></script>
</footer> </div>

<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
<script type="text/javascript" src="styles/docfx.vendor.js"></script>
<script type="text/javascript" src="styles/docfx.js"></script>
<script type="text/javascript" src="styles/main.js"></script>
</body>
</html>

0 comments on commit 974d935

Please sign in to comment.