Hello, I'm looking at some ASM code trying to figure out what it does because I'm trying to learn ASM and I find it easiest to learn by examples (I'm also reading 'The Art of Assembly' and another online tutorial). SO I was wondering if anyone could explain what this line of code is doing:

LEA EAX,DWORD PTR SS:

thanks in advance :: tim
Posted on 2004-10-22 16:58:19 by AnarchySI
LEA is for doing an address calculation (Load Effective Address). The "DWORD PTR SS:" is superfluous (I assume you are looking at a disassembly as the only logical purpose for a human to include that portion would be to document the code in some way).

Short Answer: EAX = EBX - 34

FYI: There is much better code to look at than a disassembly - if you are truely intent on learning x86.
Posted on 2004-10-22 17:34:51 by bitRAKE
thank you, thats rather helpful. :)

and do you suggest anywhere that i might find some helpful source?
Posted on 2004-10-22 17:37:26 by AnarchySI
thank you, thats rather helpful. :)

and do you suggest anywhere that i might find some helpful source?


http://win32asm.cjb.net/

http://www.geocities.com/ge2001/td/
Posted on 2004-10-23 00:22:22 by לח&am
do you suggest anywhere that i might find some helpful source?

1. Download or order the Intel x86 manuals and Platform SDK
2. Keep them a click or page flip away
3. Find some tasks to program
4. Code until the program is broke and you are lost
5. Search this board for clues
6. Post a question if needed
7. Goto #3

When #4 lasts too long increase the complexity of #3.

You are at #6, but you haven't done #5.

KetilO has some easy to read code, imho.
Posted on 2004-10-23 01:46:08 by bitRAKE
your suggestion is really helpful for me too!!

thank you!
Posted on 2004-10-23 09:35:30 by bailao