This is my first night playing with x86 ASM and I can store data in variables, however I have two problems, I cannot store data from an array index into a register or another variable, and I cannot copy bytes/words from and to variables. The following code is what Im trying, and it returns operand type errors:
Code:
int y[5]];
y[2] = 10;
char *a=new char[5];
char *b=new char[5];
a="a";
b="b";
__asm
{
//First I am trying to copy one string, to the other:
mov SI, OFFSET a;
mov DI, OFFSET b; //Returns error
movs; //Returns error
//Second I want to place y, into a register or another variable, neither will work:
mov AX, y[2]; //Returns error
}
It would be greatly appreciated if someone could tell me why this inline function does not work, and if you can, please list any good ASM tutorial sites which may be good for Inline ASM like this. Thanks.