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

hugang <> 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
Please read the FAQ at

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