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.
Reworked fat file system. Added conditionals for debug output. Implem…
…ented some System.IO plugs.
- Loading branch information
1 parent
417df82
commit fd54c66
Showing
21 changed files
with
556 additions
and
774 deletions.
There are no files selected for viewing
Binary file not shown.
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
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,54 @@ | ||
using global::System.Diagnostics; | ||
|
||
namespace Cosmos.IL2CPU | ||
{ | ||
public static class CompilerHelpers | ||
{ | ||
private static global::Cosmos.Debug.Kernel.Debugger mDebugger = new global::Cosmos.Debug.Kernel.Debugger("IL2CPU", "Debug"); | ||
|
||
[Conditional("COSMOSDEBUG")] | ||
public static void Debug(string aMessage, params object[] aParams) | ||
{ | ||
string xMessage = aMessage; | ||
|
||
if (aParams != null) | ||
{ | ||
aMessage = aMessage + " : "; | ||
for (int i = 0; i < aParams.Length; i++) | ||
{ | ||
string xParam = aParams[i].ToString(); | ||
if (!string.IsNullOrWhiteSpace(xParam)) | ||
{ | ||
aMessage = aMessage + " " + xParam; | ||
} | ||
} | ||
} | ||
|
||
mDebugger.Send("FileSystem Trace: " + aMessage); | ||
} | ||
|
||
[Conditional("COSMOSDEBUG")] | ||
public static void Debug(string aMessage) | ||
{ | ||
mDebugger.Send("FAT Debug: " + aMessage); | ||
} | ||
|
||
[Conditional("COSMOSDEBUG")] | ||
public static void DebugNumber(uint aValue) | ||
{ | ||
mDebugger.SendNumber(aValue); | ||
} | ||
|
||
[Conditional("COSMOSDEBUG")] | ||
public static void DebugNumber(ulong aValue) | ||
{ | ||
mDebugger.Send(((uint)aValue).ToString() + ((uint)aValue >> 32).ToString()); | ||
} | ||
|
||
[Conditional("COSMOSDEBUG")] | ||
public static void DevDebug(string message) | ||
{ | ||
mDebugger.Send("FAT DevDebug: " + message); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.