From: Reinier Heeres Newsgroups: comp.os.msdos.djgpp Subject: Re: asm xor problems Date: Sat, 04 Oct 1997 22:56:28 +0200 Organization: World Online Lines: 26 Message-ID: <3436AD7B.CA40B171@worldonline.nl> References: Reply-To: rwh AT worldonline DOT nl NNTP-Posting-Host: alkmr1-p99.worldonline.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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