Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
mterwoord committed Jun 17, 2015
1 parent 68282aa commit 5c11649
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 276 deletions.
8 changes: 4 additions & 4 deletions Demos/Guess/Guess.Cosmos
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<TraceMode>User</TraceMode>
<BuildTarget>PXE</BuildTarget>
<VMWareFlavor>Player</VMWareFlavor>
<StartCosmosGDB>True</StartCosmosGDB>
<StartCosmosGDB>False</StartCosmosGDB>
<VMwareEdition>Workstation</VMwareEdition>
<VMwareDeploy>ISO</VMwareDeploy>
<IgnoreDebugStubAttribute>False</IgnoreDebugStubAttribute>
Expand Down Expand Up @@ -68,7 +68,7 @@
<VMware_UseInternalAssembler>False</VMware_UseInternalAssembler>
<VMware_TraceAssemblies>All</VMware_TraceAssemblies>
<VMware_EnableGDB>True</VMware_EnableGDB>
<VMware_StartCosmosGDB>True</VMware_StartCosmosGDB>
<VMware_StartCosmosGDB>False</VMware_StartCosmosGDB>
<ISO_Deployment>ISO</ISO_Deployment>
<ISO_Launch>None</ISO_Launch>
<ISO_DebugEnabled>False</ISO_DebugEnabled>
Expand Down Expand Up @@ -191,7 +191,7 @@
<TraceMode>User</TraceMode>
<BuildTarget>PXE</BuildTarget>
<VMWareFlavor>Player</VMWareFlavor>
<StartCosmosGDB>True</StartCosmosGDB>
<StartCosmosGDB>False</StartCosmosGDB>
<VMwareEdition>Workstation</VMwareEdition>
<VMwareDeploy>ISO</VMwareDeploy>
<IgnoreDebugStubAttribute>False</IgnoreDebugStubAttribute>
Expand Down Expand Up @@ -234,7 +234,7 @@
<VMware_UseInternalAssembler>False</VMware_UseInternalAssembler>
<VMware_TraceAssemblies>All</VMware_TraceAssemblies>
<VMware_EnableGDB>True</VMware_EnableGDB>
<VMware_StartCosmosGDB>True</VMware_StartCosmosGDB>
<VMware_StartCosmosGDB>False</VMware_StartCosmosGDB>
<ISO_Deployment>ISO</ISO_Deployment>
<ISO_Launch>None</ISO_Launch>
<ISO_DebugEnabled>False</ISO_DebugEnabled>
Expand Down
98 changes: 0 additions & 98 deletions Demos/Guess/GuessOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,109 +25,11 @@ protected override void BeforeRun() {

private Debugger mDebugger = new Debugger("User", "Guess");

[StructLayout(LayoutKind.Explicit)]
private class MyStruct
{
public MyStruct()
{

}

public MyStruct(short a, short b, short c, short d, short e)
{
A = a;
B = b;
C = c;
D = d;
E = e;
}

[FieldOffset(0)]
public short A;
[FieldOffset(2)]
public short B;
[FieldOffset(4)]
public short C;
[FieldOffset(6)]
public short D;
[FieldOffset(8)]
public short E;
}

private static T GetValue<T>(T[] arr, int index)
{
return arr[index];
}

protected override void Run()
{
//var xQueue = new Queue<MyStruct>(8);
//xQueue.Enqueue(new MyStruct(1, 2, 3, 4, 5));
//xQueue.Enqueue(new MyStruct(6, 7, 8, 9, 10));

//var xTest = 3 % 8;
//Console.Write("Test: ");
//Console.WriteLine(xTest.ToString());

////var xItem = xQueue.Dequeue();
////Console.Write("Char: ");
////Console.WriteLine(xResult.KeyChar);
//var xItem = new MyStruct
// {
// A = 1,
// B = 2,
// C = 3,
// D = 4,
// E = 5
// };

//var xArray = new MyStruct[1];
//xArray[0] = xItem;
////xArray[0] = new MyStruct(1, 2, 3, 4, 5);

//xItem = xArray[0];
//Console.Write("A: ");
//Console.WriteLine(xItem.A);
//Console.Write("B: ");
//Console.WriteLine(xItem.B);
//Console.Write("C: ");
//Console.WriteLine(xItem.C);
//Console.Write("D: ");
//Console.WriteLine(xItem.D);
//Console.Write("E: ");
//Console.WriteLine(xItem.E);

////xItem = new MyStruct(6, 7, 8, 9, 10);

//Console.WriteLine("Next: ");
////xItem = xQueue.Dequeue();
////Console.Write("Char: ");
////Console.WriteLine(xResult.KeyChar);

////var xArray = new MyStruct[0];
////xArray[0] = new MyStruct(1, 2, 3, 4, 5);

//xItem = GetValue(xArray, 0);
//Console.Write("A: ");
//Console.WriteLine(xItem.A);
//Console.Write("B: ");
//Console.WriteLine(xItem.B);
//Console.Write("C: ");
//Console.WriteLine(xItem.C);
//Console.Write("D: ");
//Console.WriteLine(xItem.D);
//Console.Write("E: ");
//Console.WriteLine(xItem.E);


//while (true)
// ;

//Stop();
mCount++;
mDebugger.SendMessage("Kernel", "New iteration");
Console.WriteLine();
Console.Write("\n");
Console.WriteLine("Guess #" + mCount);
Console.Write("Please enter a guess: ");
string xInputStr = Console.ReadLine();
Expand Down
Loading

0 comments on commit 5c11649

Please sign in to comment.