how to traverse byte array in assembly using nasm as assembler?
hello, I am trying to learn assembly using nasm as assembler. I did not found example related to string operation. I had following example code,
push ebp ; remember base pointer
mov ebp, esp ; init current base pointer
mov ecx, [ebp + 8] ; get pointer to string
movsb edx,[ecx] ; first byte
pop ebp ; pop return address in ebp
my problem is at highlighted line, I am not getting how to copy a byte into 4 byte reg. rather what is syntax of mov instruction to mov byte to WORD DWORD etc.
if possible please give some example, and alternative solution if known.