VOGONS


First post, by raMASTER

User metadata
Rank Newbie
Rank
Newbie

i got one where the hex editor has:

BF963E

the disassembler has:

mov di,0x3e96

but dosbox debugger has:

BF8340 mov di,0x4083

It's a constant static number not a jump address, other constants seem to be equal.
I'm sure i did not got the positions of the instruction confused
the instruction is right after checking dos version
I'm in linux with a dosbox 0.74 build with debugger=heavy

p.s. why represent some registers as 32 bit ? to debug windows in dosbox ?

Reply 1 of 1, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I split your question into a separate thread because it really has nothing to do with the thread you posted it in.

The most common and likely reason a constant word value changes under execution is that it is a relocated segment within an EXE format executable. With relocation, the load segment is added to the base value in the executable, and that is consistent with what you're seeing. Another possibility is self-modifying code, but it's less likely than relocation.

FYI, 386 and later CPUs have 32-bit registers. The debugger's disassembly tries to figure out if values should be decoded as 32-bits depending on the emulated CPU being in real mode or protected mode, or an override prefix byte in the instruction.