![]() |
someone help out this newbie
What is this?
:
lea ecx, ds:80h[ecx*4]is it simply ecx = ecx * 4? Does it have anything to do with the data segment? it appears here: :
this::0 = &some_vector_table; |
I haven't programmed in x86 assembly for years.
lea is load effective address lea ecx, ds:80h[ecx*4] This loads an address into ecx. It doesn't actually load anything from memory. It just calculates the address. I think it basically allows you to use mathmatical operations rather than instructions to make code cleaner. ds is one of the segmentation registers. It seems like I used ds to access the hard drive. Since you have the word socket in there, it makes me think it could be the network, although I'm speculating now. Hopefully I helped a little. |
Using lea is like setting a pointer to point to a variable, rather than fetching the variable. DS is the data segment register. It is not required that one use if strictly for that, more in the nature of a convention.
|
hmm... I dont understand that data segment register bit: "ds:80h." There are a couple of strings declared on 80h offset of data segment and should not be relevent. What is its purpose there? From what I see its calculating the new size of a buffer. From what I remember, my college professor used to use "rAB:rCD:rEF" notation to denote higher resolution numbers.
|
| All times are GMT -5. The time now is 6:14 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC