forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
237 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Reflection; | ||
using System.Resources; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Package Name")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Company")] | ||
[assembly: AssemblyProduct("Package Name")] | ||
[assembly: AssemblyCopyright("")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: ComVisible(false)] | ||
[assembly: CLSCompliant(false)] | ||
[assembly: NeutralResourcesLanguage("en-US")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Revision and Build Numbers | ||
// by using the '*' as shown below: | ||
|
||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Cosmos.HAL; | ||
using Sys = Cosmos.System; | ||
|
||
namespace VGACompilerCrash | ||
{ | ||
public class Kernel : Sys.Kernel | ||
{ | ||
public static VGAScreen screen = new VGAScreen(); | ||
|
||
public void startGraphics() | ||
{ | ||
//screen.SetGraphicsMode(VGAScreen.ScreenSize.Size320x200,VGAScreen.ColorDepth.BitDepth8); | ||
//screen.Clear(0); | ||
} | ||
|
||
protected override void BeforeRun() | ||
{ | ||
Console.WriteLine("Successfully Loaded."); | ||
} | ||
|
||
protected override void Run() | ||
{ | ||
Console.WriteLine("Welcome. Please login with the administrative credentials provided to you."); | ||
//LOGIN | ||
string username = ""; | ||
string password = ""; | ||
bool loggedIn = false; | ||
int attempts = 0; | ||
while (!loggedIn) | ||
{ | ||
Console.Write("Username:"); | ||
username = Console.ReadLine(); | ||
Console.Write("Password:"); | ||
password = Console.ReadLine(); | ||
if (username == "root" && password == "password") | ||
loggedIn = true; | ||
else { attempts++; Console.WriteLine("Error: password mismatch. Try again."); } | ||
if (attempts >= 3) | ||
{ | ||
Console.WriteLine("Too many attempts. Please power down."); //add ACPI.Shutdown later | ||
while (!loggedIn) { } | ||
} | ||
} | ||
//END LOGIN | ||
while (loggedIn) | ||
{ | ||
Console.Write(">: "); | ||
var input = Console.ReadLine(); | ||
if (input == "startx") | ||
{ | ||
startGraphics(); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>9.0.30729</ProductVersion> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{21915A7E-CC84-4836-8B87-857B6149D496}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>VGACompilerCrash</RootNamespace> | ||
<AssemblyName>VGACompilerCrash</AssemblyName> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<PlatformTarget>x86</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="Cosmos.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL" /> | ||
<Reference Include="Cosmos.System, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL" /> | ||
<Reference Include="Cosmos.Debug.Kernel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983, processorArchitecture=MSIL" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Kernel.cs" /> | ||
<Compile Include="AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\source\Cosmos.HAL\Cosmos.HAL.csproj"> | ||
<Project>{6A991D03-1435-4005-9809-B8BACDF3B021}</Project> | ||
<Name>Cosmos.HAL</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
48 changes: 48 additions & 0 deletions
48
Tests/Staging/VGACompilerCrash/VGACompilerCrashBoot.Cosmos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>{78ac2b12-8185-4033-80f0-da5bf874be5e}</ProjectGuid> | ||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> | ||
<Name>VGACompilerCrashBoot</Name> | ||
<BinFormat>elf</BinFormat> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<Profile>VMware</Profile> | ||
<!-- Looks like this was a mispelled attribute. Replaced by DebugEnabled below. | ||
<DebugEnable>true</DebugEnable> | ||
--> | ||
<DebugEnabled>true</DebugEnabled> | ||
<DebugMode>Source</DebugMode> | ||
<TraceMode>User</TraceMode> | ||
<EnableGDB>False</EnableGDB> | ||
<StartCosmosGDB>false</StartCosmosGDB> | ||
<VMWareEdition>Player</VMWareEdition> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<Name>VGACompilerCrashBoot</Name> | ||
<Description>Use VMware Player or Workstation to deploy and debug.</Description> | ||
<Deployment>ISO</Deployment> | ||
<Launch>VMware</Launch> | ||
<VisualStudioDebugPort>Pipe: Cosmos\Serial</VisualStudioDebugPort> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Cosmos.Core.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" /> | ||
<Reference Include="Cosmos.System.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" /> | ||
<Reference Include="Cosmos.Debug.Kernel.Plugs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\VGACompilerCrash\VGACompilerCrash.csproj"> | ||
<Name>VGACompilerCrash</Name> | ||
<Project>{21915a7e-cc84-4836-8b87-857b6149d496}</Project> | ||
<Private>True</Private> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<!--<ItemGroup> | ||
<Content Include="Cosmos.bxrc"> | ||
<SubType>Content</SubType> | ||
</Content> | ||
</ItemGroup>--> | ||
<Import Project="$(MSBuildExtensionsPath)\Cosmos\Cosmos.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters