Many Intel / AMD x86 instructions are available in the βmodrmβ format - they have two operands, one of which must be a register, the other of which may be a register or a memory reference whose address is determined by the modrm of the instruction encoding byte and, possibly, subsequent bytes commands such as sib (scaled index byte) and immediate read / write offset. And also with the help of a possible segment prefix byte.
This is usually reg, reg / mem form instructions
rsrcdst += rsrc or rsrcdst += Memory[ ... addressessing mode ...]
However, in the x86 assembly code there are no separate operation / command codes for reg, reg and reg, mem forms of these instructions. Whether the operand is defined in a register or in a memory cell, in assembler, using assembly syntax.
In this case, your build code
MOVSX ECX, BYTE PTR DS: [EDX]
The command operation code is MOVSX.
The destination operand is the ECX register.
The source operand is "BYTE PTR DS: [EDX]". The fact that this is a reference to memory is indicated by several things: (1) square brackets around "[EDX]" - square brackets are short for Memory [... address ...]. (2) the prefix "DS:", which indicates that it is in the data segment. Register operands do not have such a segment prefix. (3) βBYTE PTR,β which states: βTake the memory address indicated byβ DS: [EDX] βand interpret it as a reference to an 8-bit byte in memory.β
I suspect you really want
MOVSX ECX,DL
"DL" is the name for the lower 8 bits of the 32-bit EDX register. That is, DL = EDX.bits [7: 0]. Unfortunately, x86 assemblers usually do not accept syntax like "EDX.bits [7: 0]" (unless I wrote them), so you need to know the historical names of the subregisters:
AL = EAX.bits[7:0] AH = EAX.bits[15:8] AX = EAX.bits[15:0] EAX = 32 bit register that "covers" all of the above
etc .: BL, CL, DL, DI, ...