1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 01:58:00 +02:00

Support for comptime file IO and process creation

This commit is contained in:
Brian Fiete 2021-12-20 09:39:39 -05:00
parent 045e706600
commit ce4b6e04de
19 changed files with 726 additions and 89 deletions

View file

@ -106,5 +106,24 @@ namespace System.Diagnostics
if (gIsDebuggerPresent)
Break();
}
public static void WriteMemory(Span<uint8> mem)
{
String str = scope .();
for (int i < mem.Length)
{
if ((i != 0) && (i % 16 == 0))
str.Append('\n');
str.AppendF($" {mem.[Friend]mPtr[i]:X2}");
}
str.Append('\n');
Write(str);
}
public static void WriteMemory<T>(T result)
{
#unwarn
WriteMemory(.((.)&result, sizeof(T)));
}
}
}