mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-07 16:15:23 +13:00
updated disassembly program to support a custom stop address
hg-commit-id: a2bee0bdb345
This commit is contained in:
parent
7b5159fb06
commit
a297c105b5
3 changed files with 53 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ Parser::Parser()
|
|||
fileLength = 0;
|
||||
filePos = 0;
|
||||
stop = false;
|
||||
stopAddress = 0;
|
||||
}
|
||||
|
||||
Parser::Parser(std::string filename)
|
||||
|
|
@ -46,6 +47,16 @@ void Parser::SetFilename(std::string value)
|
|||
Read();
|
||||
}
|
||||
|
||||
unsigned int Parser::GetStopAddress()
|
||||
{
|
||||
return stopAddress;
|
||||
}
|
||||
|
||||
void Parser::SetStopAddress(unsigned int value)
|
||||
{
|
||||
stopAddress = value;
|
||||
}
|
||||
|
||||
string Parser::GetParsedAsm()
|
||||
{
|
||||
string tmpStr;
|
||||
|
|
@ -192,6 +203,9 @@ void Parser::ParseNext() // Parses the block immidiately following
|
|||
unkCode << "db $" << hex << uppercase << (short)rawBytesFixed[i];
|
||||
parsedString.push_back(unkCode.str());
|
||||
}
|
||||
|
||||
// If the stop address parameter is set, break when we get there
|
||||
if( (stopAddress != 0) && (i >= stopAddress) ) break;
|
||||
}
|
||||
|
||||
// Now record the postion we left off
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue