This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using GAS, any tutorials


I understand the difference in assembly mnemonic and I have written numerous
assembly language programs for consumer products.  I am lost however with GNU in
that there is no documentation available which tells one how to set up directives
for the assembler.  The tools I have used before always tell you how to begin your

program, what directives need to be there and why, and additional "configuration"
info to embed into the program that really has nothing to do with the actual code
itself.  Such as all *.s files begin with .file "filename", (do they? The examples

I see do..), immediately after file you put .align "some number", (do you have to
put it there? can I put it later in the program?), every file ends with .end (does

it?  the example I have does and what is this .end anyway, GAS does not list .end
)  These are the types of questions that I have and I don't find any info
available for these types of questions.  Do I need to write one after basically 6
months of trial and error.  I understand the principle that "unless it's hard, it
can't be good" Unix mentality, but geezzz!  We can do better in my own humble
opinion.

R.Floyd



mike wrote:

> It really depends on your target.
> (The different target has the different assembly mnemonic.)
> I suggest you read the .s file generated by gcc.
> {
> In my case:   m68k-coff-gcc -S foo.c
> and take a look at 'foo.s'.
> then use the 'asm' function, like
>  asm ("move.l %a0, %d0"),
> what ever you've see in the dot s file.
> }
> BTW, there is a doc about target as x86.
> http://www.castle.net/~avly/djasm.html
>
> ----- Original Message -----
> From: "robert floyd" <robertfloyd1@home.com>
> To: <crossgcc@sources.redhat.com>
> Sent: Thursday, October 19, 2000 12:30 PM
> Subject: Using GAS, any tutorials
>
> > Is there any tutorial, examples or manuals available that explain the
> steps
> > on how to write a program in assembly for an embedded target?  I read the
> > GAS manual, provides lots of info on COMMAND LINE options, etc. but does
> not
> > even begin to tell me where to start.
> >
> >
> >
> > ------
> > Want more information?  See the CrossGCC FAQ,
> http://www.objsw.com/CrossGCC/
> > Want to unsubscribe? Send a note to
> crossgcc-unsubscribe@sourceware.cygnus.com
> >
> >
>
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]