Re: Set a register to 0

From: Bx.C (invalid-email-address_at_invalid.shiragajin)
Date: 04/20/04


Date: Tue, 20 Apr 2004 14:13:12 +0000 (UTC)


"Bx.C" <invalid-email-address@invalid.shiragajin> wrote in message
news:zECdc.7447$Lh2.3542@bignews1.bellsouth.net...
>
> "Kewoul" <Kewool@Kewool.com> wrote in message
news:4076e4b6$0$18229$626a14ce@news.free.fr...
> > So as to have 0 in BX, I often see things like this :
> >
> > xor bx,bx
> >
> > Why don't they write mov bx, 0 ?
> >
> >
> >
>
> xor bx,bx is coded one byte shorter... and though normally an operation
such as this would have
> a dependency on bx, since this shorter code has been used for years and
years to zero out a
> register, there's no dependency on most processors for the xor
reg_a,reg_a...
>
> this helps?
>
>

now where in the world has this post been? i sent it out over 10 days ago
(Apr 9, @ 14:31 Central time)



Relevant Pages

  • Re: Set a register to 0
    ... > xor bx,bx is coded one byte shorter... ... > register, there's no dependency on most processors for the xor ...
    (alt.lang.asm)
  • Re: Set a register to 0
    ... xor bx,bx is coded one byte shorter... ... register, there's no dependency on most processors for the xor reg_a,reg_a... ...
    (comp.lang.asm.x86)
  • Re: No difference on my machine
    ... There shouldn't be a difference on any x86 except that xor eax,eax ... is shorter and this will affect the code alignment after it. ...
    (alt.lang.asm)
  • Re: A doubt...
    ... >> xor it with a (shorter) password, is it possible to reobtain A ... > entropy' isn't quite clear conceptually and operands of xor ...
    (sci.crypt)