Describe the bug
On the same code example I used in #304, I found that if I define some value in the disassembler, the decompiler will not use the equate value
To Reproduce
void __cdecl16near _display_control(uint flags)
assume DS = 0xec25
void <VOID> <RETURN>
uint Stack[0x2]:2 flags
_display_control
e000:a672 55 PUSH BP
e000:a673 8b ec MOV BP,SP
e000:a675 8b 5e 04 MOV BX,word ptr [BP + flags]
e000:a678 b4 00 MOV AH,DISPLAY_CONTROL
e000:a67a cd 12 INT INT_DISP
e000:a67c 5d POP BP
e000:a67d c3 RET
I'm replacing some value by #define value, like on the INT INT_DISP but the decompiler still show swi(0x12):
void __cdecl16near _display_control(uint flags)
{
code *pcVar1;
pcVar1 = (code *)swi(0x12);
(*pcVar1)();
return;
}
Expected behavior
Equate should be shared between both view
Screenshots
See above
Attachments
N/A
Environment (please complete the following information):
Additional context
N/A
Mapping of equates into the decompiler is broken for 16-bit x86 programs. This seems to be a side-effect of the segmented address space. Working on a patch.
Fix in master
Most helpful comment
Mapping of equates into the decompiler is broken for 16-bit x86 programs. This seems to be a side-effect of the segmented address space. Working on a patch.