Find the answer to your Linux question:
Results 1 to 2 of 2
My developing environment is: OS(fedora2), compiler(arm-linux-gcc), target(arm9) I am doing some work, it does not perform as what I expected. So I want to change some C code to asm ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    5

    How to add asm code to a '.C' file


    My developing environment is: OS(fedora2), compiler(arm-linux-gcc), target(arm9)
    I am doing some work, it does not perform as what I expected. So I want to change some C code to asm code to improve the performance. But I have not found any useful article or books. Somebody told me to watch the examples, however, I don't think it is good way.
    Any help will be appreciated!

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    It should just be a case of the following:
    Code:
    main() {
      asm("... assembly code ")
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •