Converting C code to Assembly!

A

Ali

Hey Folks,
Though it is crystal clear that every compiler produces an
assebmly code watever high language source file you are going to
compile , but what i want to know is that is there any tool or atleast
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..

Regards

ali
 
G

Grumble

Ali said:
Though it is crystal clear that every compiler produces an
assembly code watever high language source file you are going to
compile

No. Some compilers do translate directly from intermediate
representation to binary code.
but what i want to know is that is there any tool or at least
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..

You should ask on the WinAVR mailing list.
http://sourceforge.net/mail/?group_id=68108

I imagine you tried the -S flag?
 
K

Keith Thompson

Ali said:
Though it is crystal clear that every compiler produces an
assebmly code watever high language source file you are going to
compile ,

Not necessarily. Some compilers might generate machine code directly,
without going through an intermediate assembly language step.
but what i want to know is that is there any tool or atleast
some command line options for avr-gcc to produce assembly code without
any extra stuff . Well i have C winAVR source file and i want its exact
replica in assembly , without any ctors , do_copy_data etc..

I don't know what you mean by "extra stuff", but your question really
doesn't have much to do with the C programming language.

<http://sourceforge.net/projects/winavr/> has links to mailing lists.
 
A

Ali

I imagine you tried the -S flag?
Yeah , i was really missing this! thanks Grumble.
No. Some compilers do translate directly from intermediate representation to binary code.
Well thats matter of discussion as Thompson also pointed in his post.
To me any reasonable compiler writter should not skip this step though
he can put this optional.


I don't know what you mean by "extra stuff"
It means *not* providing -S option for object dump. Isn't simple to
understand?
but your question really doesn't have much to do with the C programming language.

Come on i got the solution here and you are saying that its not right
place to ask such question;-) Infact this post is related to C.

A little addition to original post:
Infact by high level languages i mean c/c++/delphi etc. rahter markUp
languages.
 
C

Chris Dollin

Ali said:
Yeah , i was really missing this! thanks Grumble.
Well thats matter of discussion as Thompson also pointed in his post.
To me any reasonable compiler writter should not skip this step though
he can put this optional.

Off-topic but - why require a compiler writer to work via an assembly
language if they don't need to?

[Sometimes it's a great [1] way to discover bugs in an assembler [2], mind.]

[1] For values of "great" which are head-bangingly insanely painful.

[2] This happened with one of the Pop11 ports, but I can't recall which
machine.
 
K

Keith Thompson

Ali said:
It means *not* providing -S option for object dump. Isn't simple to
understand?

I still don't know what you mean, but that's ok.
Come on i got the solution here and you are saying that its not right
place to ask such question;-) Infact this post is related to C.

Correct, this is not the right place to ask such questions. This
newsgroup is for discussion of the C programming language. Your
question was about how to use a particular compiler, not about how to
program in the language. Sometimes people will answer off-topic
questions; that doesn't mean they're topical.
 
A

Ali

So what is use in just posting and posting for off-topic.
Please see the subject of OP , you will see the word 'C' and 'Code' in
that.

Bye and over.
 
C

Chris Dollin

Ali said:
So what is use in just posting and posting for off-topic.
What?

Please see the subject of OP , you will see the word 'C' and 'Code' in
that.

Yes. Which isn't sufficient for the content to be on-topic.
 
N

Nelu

Ali said:
So what is use in just posting and posting for off-topic.
Please see the subject of OP , you will see the word 'C' and 'Code' in
that.

Bye and over.

it's comp.lang.c it's neither comp.code.c nor
comp.code.lang.c
 
M

Mark McIntyre

Yeah , i was really missing this! thanks Grumble.
To me any reasonable compiler writter should not skip this step

Why, for goodness' sake ? Why shouldn't a compiler convert directly to
binary?
It means *not* providing -S option for object dump. Isn't simple to
understand?

If you mean that, then write it, don't write so cryptically that
people don't understand you.

Come on i got the solution here and you are saying that its not right
place to ask such question;-)

You could ask an axe murderer for a recipe for cookies, and maybe
you'd get one, but that doesn't mean he's the right person to ask.
Infact this post is related to C.

No, its not. Its related to how a toolset might behave, which is
nothing to do with the C Language, the topic here.
Mark McIntyre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top