From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?q?Anticipating=20a=20Reply?= Subject: Re: explaination needed. Date: Tue, 3 Feb 2004 07:52:32 +0000 (GMT) Sender: linux-assembly-owner@vger.kernel.org Message-ID: <20040203075232.49558.qmail@web41105.mail.yahoo.com> References: <20040203122436.5eeb776f.vadiraj@odysseytec.com> Reply-To: ruxyz@yahoo.com Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-Reply-To: <20040203122436.5eeb776f.vadiraj@odysseytec.com> List-Id: Content-Type: text/plain; charset="us-ascii" To: Vadiraj C S , linux-assembly@vger.kernel.org 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 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