IDA's default x86 assembly syntax is not very clear about pointer dereferences. One of these is dereferencing the memory operand, and one is simply moving the address to the register:
mov ecx, offset dword_130B78
mov eax, off_130AF8
You can improve this slightly by selecting Borland TASM in Ideal Mode
in Options > General > Analysis > Target Assembler:
mov eax, [off_130AF8]
But what I would like is to make it even less ambiguous by always displaying the size qualifier with ptr
:
mov eax, dword ptr [off_130AF8]
Is there a way to force IDA to do this? It does it in some cases but not others, and I'd like it to always do it.
dword ptr
. Things are different with something likemovzx eax, word ptr [eax+esi*2]
where the source gets zero-expanded into the target. And then it's not evident whether it's a single or two byte source ...dword_130B78
as a C/C++ variable, you can think ofoffset dword_130B78
as&dword_130B78
... on the other handmov eax, [off_130AF8]
could be thought of aseax = *off_130AF8
(whereoff_130AF8
is clearly a 32-bit pointer). I have the issue the other way around, since I rarely read RISC assembly. But once you become accustomed to it, it's no issue.ida.cfg
andidagui.cfg
nothing seemed to match your requirement, but who knows? ;)