fixed the missing space reserve
This commit is contained in:
parent
d3e08abd30
commit
e0ce2fb3d0
1 changed files with 6 additions and 17 deletions
|
|
@ -450,25 +450,14 @@ std::string Code::emitText() {
|
|||
while (textStart < code.size()) {
|
||||
int textLength = std::min(30, (int)code.size() - textStart);
|
||||
|
||||
// Skip all-zero sections for RESW/RESB
|
||||
bool allZeros = true;
|
||||
oss << "T ";
|
||||
oss << std::setfill('0') << std::setw(6) << std::hex << std::uppercase << (_startAddress + textStart) << " ";
|
||||
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << textLength << " ";
|
||||
|
||||
for (int i = 0; i < textLength; ++i) {
|
||||
if (code[textStart + i] != 0) {
|
||||
allZeros = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!allZeros) {
|
||||
oss << "T ";
|
||||
oss << std::setfill('0') << std::setw(6) << std::hex << std::uppercase << (_startAddress + textStart) << " ";
|
||||
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << textLength << " ";
|
||||
|
||||
for (int i = 0; i < textLength; ++i) {
|
||||
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (int)code[textStart + i];
|
||||
}
|
||||
oss << "\n";
|
||||
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (int)code[textStart + i];
|
||||
}
|
||||
oss << "\n";
|
||||
|
||||
textStart += textLength;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue