From: "Anticipating a Reply" <ruxyz@yahoo.com>
To: Vadiraj C S <vadiraj@odysseytec.com>, linux-assembly@vger.kernel.org
Subject: Re: explaination needed.
Date: Tue, 3 Feb 2004 07:52:32 +0000 (GMT) [thread overview]
Message-ID: <20040203075232.49558.qmail@web41105.mail.yahoo.com> (raw)
In-Reply-To: <20040203122436.5eeb776f.vadiraj@odysseytec.com>
Hi !
On Linux , the gcc compiler produces intermediate
assembly code in the AT&T syntax fromat .
$ refers to the immediate value .
Google to find more about AT&T syntax .
Cheers !
--- Vadiraj C S <vadiraj@odysseytec.com> wrote: >
>
> Hello Everyone!!
>
> I was just looking at the asm code generated by
> gcc. I could not get some of the stuffs, here, I'm
> familiar with
> nasm assembler syntax, but this does not seem to be
> nasm syntax.
>
> the code is for the following c program
> int main()
> {
> char *c ="1"
> c[0]= "2" ;
> }
>
>
> asm code for the above..
>
> .file "temp.c"
> .section .rodata
> .LC0:
> .string "1"
> .text
> .align 2
> .globl main
> .type main,@function
> main:
> pushl %ebp
> movl %esp, %ebp
> subl $8, %esp
> andl $-16, %esp
> movl $0, %eax
> subl %eax, %esp
> movl $.LC0, -4(%ebp)
> movl -4(%ebp), %eax
> movb $50, (%eax)
> leave
> ret
> .Lfe1:
> .size main,.Lfe1-main
> .ident "GCC: (GNU) 3.2"
>
> what syntax is this, and what does $ represent.
> does the .rodata mean readonly data?
>
> Thanks in advance..
>
> --
> Regards
> Vadiraj C S
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-assembly" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html
________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com
next prev parent reply other threads:[~2004-02-03 7:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-26 21:46 ia32 instruction sets Frederic Beuserie
2004-01-27 10:50 ` peter willy krause
2004-02-03 6:54 ` explaination needed Vadiraj C S
2004-02-03 7:52 ` Anticipating a Reply [this message]
2004-02-03 17:00 ` peter willy krause
2004-02-04 9:47 ` dEAthBloW-wnCia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040203075232.49558.qmail@web41105.mail.yahoo.com \
--to=ruxyz@yahoo.com \
--cc=linux-assembly@vger.kernel.org \
--cc=vadiraj@odysseytec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.