Question

I need to access two contiguous elements in a array of pointers. I wrote this two instruction, but when executing it says that I'm trying to access an illegal position:

mov esi, strings[ecx*4]
mov edi, strings[(ecx+1)*4]

ECX contains an index.

Are they correct or not? Thank you.

Was it helpful?

Solution

I tried

strings[ecx*4]+4

and it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top