1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Extended memory loading support

This commit is contained in:
Brian Fiete 2025-01-17 10:18:50 -08:00
parent 0efdecb719
commit 29c0f82bba
7 changed files with 136 additions and 33 deletions

View file

@ -1380,6 +1380,16 @@ void Beefy::BFFatalError(const char* message, const char* file, int line)
BFFatalError(String(message), String(file), line);
}
void MakeUpper(const StringImpl& theString)
bool Beefy::ParseMemorySpan(const StringImpl& str, void*& outPtr, int& outSize)
{
if (str.StartsWith("@"))
{
int colon = (int)str.IndexOf(':');
String addrStr = str.Substring(1, colon - 1);
String lenStr = str.Substring(colon + 1);
outPtr = (void*)(intptr)strtoll(addrStr.c_str(), NULL, 16);
outSize = (int)strtol(lenStr.c_str(), NULL, 10);
return true;
}
return false;
}