Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No OS Development options in Cosmos #1740

Closed
sketchedgrey opened this issue Apr 26, 2021 · 5 comments
Closed

No OS Development options in Cosmos #1740

sketchedgrey opened this issue Apr 26, 2021 · 5 comments

Comments

@sketchedgrey
Copy link
Contributor

Area of Cosmos - What area of Cosmos are we dealing with?

OS Development

Expected Behaviour - What do you think that should happen?

An Operating System development option should appear in project templates (Visual Studio 2019).

Actual Behaviour - What unexpectedly happens?

I get three options for kernels but nothing for the actual OS.

Reproduction - How did you get this error to appear?

Opening Visual Studio and looking for Cosmos templates made this error appear.

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

User Kit, release 20200708.

Similar to #954 but with the user kit and newer versions of Cosmos and VS.

@quajak
Copy link
Member

quajak commented Apr 26, 2021

The kernel options are what you use to develop the operating system.

@sketchedgrey
Copy link
Contributor Author

@quajak But that's just the kernel. I'm using Cosmos as an OS Development kit, I'm not trying to commit to the actual Cosmos project. I just looked up some instructions on how to create a simple operating system with Cosmos and what I was looking for seemingly checks out:

https://www.instructables.com/Make-A-Simple-Operating-System/
https://www.instructables.com/Make-an-Operating-System-in-C/

Maybe a previous version of the Cosmos user kit has what I'm looking for?

@MishaTy
Copy link
Contributor

MishaTy commented Apr 26, 2021

@sketchedgrey No, the kernel templates are what you use to make your own operating system using cosmos.

@sketchedgrey
Copy link
Contributor Author

sketchedgrey commented Apr 26, 2021

@MishaTy OK! I selected Kernel, created a project, and built it and I saw I got an ISO. Later I'll commit for some disambiguation because a kernel is not an OS in of itself. I got this code:

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

      namespace MyHobbyOS
      {
          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);
                  // Not part of the original code, but I'm assuming right here is where I'll add input/output switch logic?
              }
          }
      }

I'll close the issue as soon as everything is cleared up.
EDITS: Code formatting :(

@sketchedgrey
Copy link
Contributor Author

OK! Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants