using pointer in asm question...
Hi, im trying to write a byte in an array just like you would do in c++ like that:
*pDat[0] = somevalue;
But in asm... Instead of writing the value in the array the pointer point to, it change the pointer address... So how do you do that in asm with vs?
Here's the line of code that is incorrect:
void SomeFunction(BYTE *pDat)
{
_asm{
//... (some code)
mov byte ptr pDat[ecx], ah;
//... (some code)
}
}
Try this:
void SomeFunction(BYTE *pDat){_asm{//... (some code)mov edx, pDatmov byte ptr [edx+ecx], ah;//... (some code)}}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement