- This topic has 0 replies, 1 voice, and was last updated 13 years, 9 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › C code to assembly code
hi every one many a times i got this kind of query that how to convert the C code to assembly code, the code given on this site is in C language i need the asm code, i dont know C, can you send me the asm code…. i prefer if you use C since it is common plateform, but when you go for core design were each and every cycle of the microcontroller does matter alot then you have to go for assembly code. and also it is a bit bitter/complex (atlest for me) to code using asm… but i personaly belive asm language is very versatile and a veery good way for efficent use of microcontroller… and one who had wrote the code in C must have a look at the asm code what is generated by the compiler itself so that i will make you habitual towards asm code….
here i am writing few steps to see the asm code for the c code you have wote ( i have used keil complier here)…..
step 1:
save your file with “*****.C” (dot c) extension…. (which you generally do)….
step 2:
after you have built you the file… go to start debug option… debug-> start/stop debug session
step 3:
now go veiw -> disassembly window
step 4:
a new window will pop up, or click at he disassembly tab shown the the below pic marked in the red at the bottom….
the first red block says 12: 13:……16: is the line of your c code and corresponding to that your C code is given in just next adjusant block…
the third red block below that is the asm code for your corresponding C code generated by compiler itself…
same the 17th line code is marked in green and below it the asm code is given…
if you have any further or any futher knowledge related to this topic share on this forum
cheers
-Dagakshay