For the asm emulator i'm trying to write to convert ASM code to equivalent working code just working.. best code would be the one that can either be done in one line or two-three the most, don't care about speed.
From my understanding. MOVZX would be the same as MOV.. if done in C++.
MOV
conversion.
MOV ESI,DWORD PTR [ESP+8]
would be like
regs.d.esi = *(unsigned int *)(regs.d.esp+0x00000008);
MOVZX
conversion.
MOVZX EAX,BYTE PTR DS:[EDI]
would be like
regs.d.eax = *(unsigned char *)(regs.d.edi);
pretty much the same thing no change what so ever.
Now MOVSX
i'm having trouble converting to a simple C code.. seems to be the same as the two above.. except it attempts to append as much fully set bits in front of the value moved as possible.. like
000000C7
becomes FFFFFFC7
MOVSX EAX,AL
is this correct?regs.d.eax = (signed char)(regs.h.al);
– Iou