flat assembler
Message board for the users of flat assembler.

Index > Heap > Anybody Got a nice small paper about asm?

Author
Thread Post new topic Reply to topic
Nameless



Joined: 30 Apr 2010
Posts: 95
Nameless
well, i guess im an asm addict now xD, i cant stop it
i was wondering if someone here got a nice small paper about asm that i can print and read when im not infront of my pc reading asm?
like 10~20 papers or something Very Happy

i got the cheat sheets
Intel Assembly 80x86 CodeTable by Roger Jegerlehner [pdf]
http://www.cheat-sheets.org/saved-copy/IntelCodeTable.pdf

Win32 Assembly Cheat Sheet by Peter Kankowski [png] (strchr.com)
http://www.cheat-sheets.org/saved-copy/Win32AssemblyCheatSheet.png

gcc x86 Assembly Quick Reference ("Cheat Sheet") by Peter O. Lawlor [html]
http://www.cs.uaf.edu/2005/fall/cs301/support/x86/index.html

i memorized most of them from the excessive reading xD
F1 F1 F1..........
Post 12 Sep 2010, 22:43
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Nameless,

I'd recommend to print some assembly snippets and try to understand their inner workings too. Memorizing instructions can be fun, but it's not the basics of learning assembly language programming. Wink

Analogy from human language: vocabulary is important, but it won't help to build phrases. Top 10 instructions for kernel32.dll:
Code:
22,86%      mov
20,47%   push
6,79%   call
6,77%   cmp
4,53%    jz
4,52%     jmp
4,30%    lea
3,42%    test
3,20%   jnz
2,63%    pop    

That's around 80% of total. Wink
Post 13 Sep 2010, 06:34
View user's profile Send private message Reply with quote
Nameless



Joined: 30 Apr 2010
Posts: 95
Nameless
kewl Smile, 2 things man, can u explain me lea in the simplest way ever? i dunno how or where to use it, i looked at the 5 intel's guides, but i still got no idea :S maybe an example on using it with strings?

also whats those number?
22, 86%
20, 47%
those the hex-codes for the mnemonics?
Post 13 Sep 2010, 11:18
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4238
Location: 2018
edfed
lea will load a register with the affective adress computed by the adressing mode.

for example, when using registers as pointer+index*scale+displacement, you compute an adress.

lea eax,[ebx+ecx*4+321]

will compute the adress, as if it was any instruction on memory operand, but instead of playing with memory content, as below,

add eax,[ebx+ecx*4+321]

, it will only load the result of adress computation in eax register.



22,86% etc, are occurences of the instruction in the code, the sum of the occurences of all instructions = 100%
Post 13 Sep 2010, 11:56
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Nameless,

lea can be interpreted as special add that accepts two registers (one of them can be multiplied by 2, 4 or 8) and constant as its source operands. Something similar to eax = ebx+4*ecx+321 in one instruction. Plus, it doesn't touch EFLAGS.
Post 13 Sep 2010, 12:48
View user's profile Send private message Reply with quote
Nameless



Joined: 30 Apr 2010
Posts: 95
Nameless
thanks alot Very Happy, got it all now
i never knew that u guys like helping ppl that much Smile
Post 13 Sep 2010, 13:49
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.