Mail Archives: djgpp/1997/10/04/18:02:00
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?
Hi!
It's illegal to do "xor memory,memory". But you can do "xor
register,register".
It's illegal just because there is no instruction that handles "xor
memory,memory"
By the way: if the two variables you use are the same you should use a
mov var,0 instead, because it will always result in 0
Reinier
--
-----------------------> RwH <------------------------
RwH's page / Programming stuff: http://www.dra.nl/~rwh
Email: rwh AT worldonline DOT nl
- Raw text -