Update MASM notation and refactor code.
This commit is contained in:
parent
195e6ab3f3
commit
56195a3a66
|
@ -455,10 +455,13 @@ QString ZydisTokenizer::printValue(const TokenValue & value, bool expandModule)
|
|||
switch(mValueNotation)
|
||||
{
|
||||
case DisasmValueNotationC:
|
||||
finalText = QString("0x") + addrText;
|
||||
finalText = "0x" + addrText;
|
||||
break;
|
||||
case DisasmValueNotationMASM:
|
||||
finalText = QString("0") + addrText + QString("h");
|
||||
if((addrText[0] >= 'A' && addrText[0] <= 'F') || (addrText[0] >= 'a' && addrText[0] <= 'f'))
|
||||
finalText = "0" + addrText + "h";
|
||||
else
|
||||
finalText = addrText + "h";
|
||||
break;
|
||||
default:
|
||||
finalText = addrText;
|
||||
|
|
|
@ -228,47 +228,30 @@ void LocalVarsView::updateSlot()
|
|||
QString expr;
|
||||
QString name;
|
||||
if(j < 0)
|
||||
{
|
||||
expr = QString("%1").arg(-j, 0, 16);
|
||||
|
||||
switch(ValueNotation)
|
||||
{
|
||||
case DisasmValueNotationC:
|
||||
expr = "0x" + expr;
|
||||
break;
|
||||
case DisasmValueNotationMASM:
|
||||
expr = "0" + expr + "h";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(!MemorySpaces)
|
||||
expr = "-" + expr;
|
||||
else
|
||||
expr = " - " + expr;
|
||||
}
|
||||
else
|
||||
{
|
||||
expr = QString("%1").arg(j, 0, 16);
|
||||
|
||||
switch(ValueNotation)
|
||||
{
|
||||
case DisasmValueNotationC:
|
||||
expr = "0x" + expr;
|
||||
break;
|
||||
case DisasmValueNotationMASM:
|
||||
switch(ValueNotation)
|
||||
{
|
||||
case DisasmValueNotationC:
|
||||
expr = "0x" + expr;
|
||||
break;
|
||||
case DisasmValueNotationMASM:
|
||||
if((expr[0] >= 'A' && expr[0] <= 'F') || (expr[0] >= 'a' && expr[0] <= 'f'))
|
||||
expr = "0" + expr + "h";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(!MemorySpaces)
|
||||
expr = "+" + expr;
|
||||
else
|
||||
expr = " + " + expr;
|
||||
expr = expr + "h";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(!MemorySpaces)
|
||||
expr = ((j < 0) ? "-" : "+") + expr;
|
||||
else
|
||||
expr = ((j < 0) ? " - " : " + ") + expr;
|
||||
|
||||
expr = QString("[%1%2]").arg(baseRegisters[i]->text()).arg(expr);
|
||||
if(i == 4) //CBP
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue