From e0ce2fb3d005fb7923ef72af60c3f8c74d867007 Mon Sep 17 00:00:00 2001 From: zanostro Date: Mon, 15 Dec 2025 12:52:37 +0100 Subject: [PATCH] fixed the missing space reserve --- simulator_SIC_XE/src/code.cpp | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/simulator_SIC_XE/src/code.cpp b/simulator_SIC_XE/src/code.cpp index 9b2850f..961bf4a 100644 --- a/simulator_SIC_XE/src/code.cpp +++ b/simulator_SIC_XE/src/code.cpp @@ -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; - for (int i = 0; i < textLength; ++i) { - if (code[textStart + i] != 0) { - allZeros = false; - break; - } - } + 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 << " "; - 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"; + for (int i = 0; i < textLength; ++i) { + oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (int)code[textStart + i]; } + oss << "\n"; textStart += textLength; }