Saturday, 20 July 2013

how to convert c code into assembly in keil 8051 compiler?





How to convert c code into assembly in keil 8051 compiler?


You can convert C code into assembly by following these steps.
1 – Right Click on Target & select “Options for Target” like in the following diagram


Now the following dialog will appear.


2 – Now select “Listing” Tab and new page will appear like in the following figure


3 – Now tick “Assembly Code” check box and press OK button.


4 – Compile your code.


5 – Check newly generated “lst” extension file like main.LST in this example.

This file will have actual C code and Assembly code generated corresponding to this C code. In this way problem is that compiler generates routines with labels that are not self exploratory. This compiler generated assembly code is no more optimized. But it may help us in so many ways. Some times it may be useful for converting our previously written C code into assembly and save our time to code it again from beginning.
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

0 comments:

Post a Comment