lkml.org 
[lkml]   [2001]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Abort x86 assemble code

hugang <linuxbest@sina.com> wrote:
> I have following code ,and I can not understand the mark line,who can tell me.thanks.
> 00000ec7 xorl 0x400dec(,%eax,4),%ecx ????<-----------------What it to do.

extern u_int32_t eax;
extern u_int32_t ecx;

{
u_int32_t *ptr;

ptr = (u_int32_t *)((eax * 4) + 0x400dec);

ecx ^= *ptr;
}


Commonly used in the above form (with a fixed displacement) to access a
32bit value within an array of 32bit values.

The array start offset would be hardwired at 0x400dec, the zero based
index into the array is provided by eax.


--
Darryl Miles
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.017 / U:0.832 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site