VOGONS


First post, by mefistotelis

User metadata
Rank Newbie
Rank
Newbie

I'm using DosBox-debug 0.65 to log program execution into a file.

My knowledge about assembler is quite basic, so it is possible that I'm misinterpreting something. Anyway, it looks like disassembled log of execution has a bug. For example:

0838:136CA8 movsx eax,ax                EAX:00002001 EBX:....
0838:136CAB cmp ebx,[00267F40+eax*4] EAX:00000001 EBX:....

As you see, "movsx eax,ax" seem to work like "movsx eax,al" - higher part of AX has gone.

Another example:

0838:136C58 movsx ebx,sp                EAX:0000E801 EBX:FFFFFFC9 ... ESP:002E0D10 ...
0838:136C5B test ebx,ebx EAX:0000E801 EBX:FFFFFFE8 ... ESP:002E0D10 ...

As you see, "movsx ebx,sp" seem to work like "movsx ebx,ah" - SP is not used at all.

My conclusion: disassembler is incorrectly interpreting 8-bit operands in MOVSX.

Am I right?