Skip to contentSkip to conversation

Abort x86 assemble code

DISCUSSION Darryl Miles 1 participant 1 message Jan 4, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines · hugang

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.

Signature · 5 lines
Darryl Miles
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/