![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hello, I want to ask a question which has more it do with C ...I need to understand the Microprocessor assembly language.. I have written a C Code in T C++ 3.0 which is a basic RS232 Code for acceptind data. I need to convert this C Code back into Assembly Language, can i do that ?? How do I convert C to Assembly---- Thx | |
| |
| | (permalink) |
| That's not a good way to learn assembler. A compiler adds lots of things to the assembly code that makes life simpler for the compiler itself but will get you confused in no time... It's better to search a few good books about x86 assembler to start learning it. Also, in case you didnt know, every family of processors uses its own instruction set / architecture. So if you plan on learning assembler to lear program microcontrollers (like pics) then you shouldnt be learning x86 (PC) assembler cause its totally diffirent. | |
| |
| | (permalink) | |
| Quote:
So please tell me how I can do it ! | ||
| |
| | (permalink) |
| All you need is a disassembler google for "x86 disassembler" , lots of free programs out there. | |
| |
| | (permalink) |
| As long as you use any of the built-in functions in C, your disassembled file is going to be hell. Or if you are just interested in learning how the compiler implements loops, constructs and function calls, I'd suggest you code in a uC compiler and use a corresponding disassembler. Some uC-based compilers even produce the asm file for you as an intermediate file. | |
| |
| | (permalink) |
| check out the CC5x C compiler. It produces somewhat readable assembly code, with the C code as comments. I currently use BoostC, however I admit the assembly it produces isn't as readable.
__________________ EEgeek.net | |
| |