Mail Archives: djgpp/1997/10/04/05:34:32
Arthur Bredrick wrote:
>
> Why do I get the following error with the assembly statement, "xorb
> variable, variable"?
>
> "Error: Error: operands given don't match any known 386 instruction"
>
> Is it illegal to use xor with the same variable twice? If so, why?
>
> Art
The advanced RRSC (Reduced Register Set Computer :) x86 family
does not support memory to memory operations. You have to
get one of the arguments into a precious register first.
Something like (I might have the syntax wrong):
"movb variable1, %0" // let GCC pick the register (%0)
"xorb %0, variable2" // xor variable1 into variable2
regards, tom
- Raw text -