Fix bad ordering of WRITE display data when multiple bytes were encoded
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2020-12-20 20:12:31 +01:00
parent abbb20ce3b
commit cc06f25ee4

View file

@ -926,7 +926,7 @@ std::string ImageFormat::Instruction::toString() const{
}
op << " = 0x";
for (auto it = parameters.end() - 1; it != parameters.begin(); --it) {
for (auto it = parameters.begin() + 1; it != parameters.end(); ++it) {
op << std::hex << std::setw(parameters.size() == 2 ? 2 : 8) << std::setfill('0') << *it;
}
}
@ -979,12 +979,12 @@ std::string ImageFormat::Instruction::toString() const{
}
}else{
op << "LOAD " << getAddressRegisterName(parameters[0]);
op << "LOAD INTO " << getAddressRegisterName(parameters[0]);
if(offset){
op << "(" << std::hex << std::setw(6) << std::setfill('0') << parameters[0] << ") + *BSM_ADDR_OFFSET[" << std::dec << (uint32_t)offset << "]";
}
if(parameters[1] > 1 && increment){
op << " TO " << getAddressRegisterName(parameters[0] + (parameters[1] - 1));
op << " UNTIL " << getAddressRegisterName(parameters[0] + (parameters[1] - 1));
if(offset){
op << "(" << std::hex << std::setw(6) << std::setfill('0') << parameters[0] + (parameters[1] - 1) << ") + *BSM_ADDR_OFFSET[" << std::dec << (uint32_t)offset << "]";
}