Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

to convert into ASM file/HEX file

Status
Not open for further replies.
Which Chip and compiler are the C codes in. You need to have it installed to create a hex file out of them.
 
i m using 89C51 microcontroller..!!
but i have C program.. so want to convert it into ASM program and then in HEX code..!

its very long program in C so getting bored to understand whole program and then converting..
 
Hi, there are a host of C compilers for the 8051uc(keil, SDCC, etc). 'You' dont need to 'understand' the program to make a hex file out of it(ofcourse i dont think its going to be of any use if you do it that way) the compiler package will do it. Post the code. All the best!
 
Last edited:
you can get .hex direct from C. converted .asm would be further boring. why intermediate stage.?
indicate which files to be output in the compiler , and it would.
at least C can be studied section wise. later in life you have to write in C for major jobs, in case you gets jobs related to micros. get to habit of reading and analyzing C . all the best
 
Last edited:
What you need is a compiler. When you "build" the C code, it saves a .hex file, which you can retrieve later. Try downloading one of **broken link removed** (you'll probably want to read the descriptions to make sure you have the right one before downloading). You should be able to load your C program into it and run the compiler, and it will produce the hex file for you.

Good luck!
Regards,
Der Strom
 
DerStrom8: my suspicion: OP doesn't know compiler from assembler || what takes which and turns out who. I'm not certain we should be answering this level stuff (DYFH?). Or maybe it's me who should go away...

P.S. your tagline is a favorite, albeit in different phrase: "Anytime you make something foolproof, the next version of fool evolves"
 
Last edited:
DerStrom8: my suspicion: OP doesn't know compiler from assembler || what takes which and turns out who. I'm not certain we should be answering this level stuff (DYFH?). Or maybe it's me who should go away...

P.S. your tagline is a favorite, albeit in different phrase: "Anytime you make something foolproof, the next version of fool evolves"

Thanks--it is one of my favorites too--have also heard it "programmers today strive to create more idiot-proof programs, and the world continues to create more idiots. So far, the universe is winning" :D

Anyway, I'm not sure I understand your objection. Aren't we here to help, regardless of experience level? I think that's what's so great about this forum--newbies are not looked-down upon. They are treated as equals, and help is given whenever and wherever possible.

The OP asked for a program that could turn out a .hex file from a .c file, and all I know is that some compilers create such a file. That is why I brought it up. ;)

Regards
 
Last edited:
I agree with your concept DerStrom8,
how ever learned one is, there is still a lot to learn, thus we need not be-little a new comer.

I feel that this is happening in every walk. like in sports and games,
A regular tennis player doesn't want to play with too juniors. but forgets that he was also too Jr at some stage in life..
let us remove the childishness in the newcomers and help them to grow strong to be able to takeover the future, in their own expertise....
 
Last edited:
Rightly said derstorm and sarma. I would have pressed the like button on your posts if this was fb. Simple words of motivation really do the trick as it has done for me many times and continues to do.
 
Rightly said derstorm and sarma. I would have pressed the like button on your posts if this was fb.

I believe that is what the +/- buttons are for....? :D
 
Last edited:
Points well taken; I'll yield. I guess I'm a victim/guilty of another platitude: the less you remember of learning a subject, the less effective you are at teaching it.

A line by line expansion from C code to ASM with the HEX along side is "usually" available as compiler options.
 
nothing like that. no two people have same idea. perhaps you r point may also be right
but we humbly feel that those who are weak and at entry level need to be supported. take examples from our own houses. all are not born alike. even in, life all don't get equal opportunity.
take my case. i am no where near software. only limited to software even at my 67 age. suppose i want o to learn people like you might feel like encouraging me

i do understand that you meant that people should study some fundas and then come to international sites. and should not try to load themselves on the society asking which hand to use for eating , LoL
 
Last edited:
Points well taken; I'll yield. I guess I'm a victim/guilty of another platitude: the less you remember of learning a subject, the less effective you are at teaching it.

A line by line expansion from C code to ASM with the HEX along side is "usually" available as compiler options.

You don't have to help them outright.... Just point them in the right direction.... Actually doing it for them, isn't helping atall...
I see both sides of the argument..... You can tell if they are lazy and just want someone else to do the work, after a couple of posts... You can choose whether to help or not.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top