Re: Assembly in LInux

Tiago Maluta <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
--- On Tue, 1/27/09, Jai Sharma <[email protected]> wrote:

> Dear friends,
> 
> With all of your help and my motivation, I am to do
> application
> programming in Linux using C.
> I made some local intranet applications for my company
> using CURL,
> MySQL, Pipe, and gnuplot.
> 
> But now I want to do some system programming under Linux.
> For that
> purpose I need to study
> Assembly Language.
> 
> I am studying two books to make programs using Assembly
> Language:
> 
> 1. Assembly Language Step-by-Step: Programming with DOS and
> Linux,
> Second Edition
> 2. Art of Assembly
> 
> I need your help to understand Assembly Language for Linux.
> If you guys have some links or documentation.
> Then please share with me. I am great thankful to you.
> 

1) About Inline Assembly for x86 in Linux
http://www.ibm.com/developerworks/linux/library/l-ia.html?dwzone=linux

2) Syntax issues: Intel vs. AT&T
http://asm.sourceforge.net//articles/linasm.html
http://www.imada.sdu.dk/~kslarsen/dm18/Litteratur/IntelnATT.htm

3) Links, articles, docs...
http://asm.sourceforge.net/resources.html#docs

4) If you like see assembly generated by GCC use "--save-temps" option. 
In this case the assembly output will be different from first aproach by "humam" asm code, a lot of optimization and heavy use of stack, but it's interessing take a look.

#gcc --save-temps foo.c -o foo
#vi foo.s

Best regards,

--
Tiago Maluta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.