We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
HI iam new to microcontrollers, iam working on c8051f003,my question is can i compile obj file or can i extract assembly code from obj and save as .asm will it work regards wilson
You cannot compile an OBJ file. An OBJ file is the result of something that has already been compiled or assembled. It is theoretically possible to link an OBJ file to a target code image file, such as OMF, HEX or BIN format. Then using a disassembler it is feasible to derive an asembly language listing of the corresponding code. However it is a rare case where this is a productive exercise. In 99.6% of cases it is better to search out the original source code or to re-write the code over again from scratch. Michael Karas
The tool you're looking for is usually called a "disassembler". Translation back to C would often be called a "decompiler". http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=8051+disassembler
"Translation back to C would often be called a 'decompiler'." Most often, it's just called highly improbable ;-) With assembler, each source instruction creates exactly one machine instruction - so, conversely, each machine instruction can be converted back to the source instruction that created it. With high-level languages (such as 'C') this is not so; a single source instruction is likely to create very many machine instructions. Also, many different source lines could be implemented with the same sequence of machine instrucions. THus it is extremely difficult to "decompile" from machine code to 'C' source.