EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / C code to assembly code

C code to assembly code

|

Microcontroller › 8051 › C code to assembly code

  • This topic has 0 replies, 1 voice, and was last updated 14 years, 3 months ago by dagakshay.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • March 9, 2011 at 8:01 am #4733
    dagakshay
    Participant

    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

  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Curved lines in PCB design June 15, 2025
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz June 15, 2025
  • using a RTC in SF basic June 15, 2025
  • PIC KIT 3 not able to program dsPIC June 15, 2025
  • Siemens large industrial PLC parts June 15, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise