Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3221394
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:52:15+00:00 2026-05-17T15:52:15+00:00

I am searching for a compiler or better IDE for C which could generate

  • 0

I am searching for a compiler or better IDE for C which could generate completely linked program, including functions from CRT, in assembler form. Is there any? I tried Visual C Express 2008. It has a disassembler, but its somewhat strange. I mean for some reason it shows many “strange” lines of code, such as mov a,#3 in about 100 lines…. It for study purposes. Thanks for tips.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:52:16+00:00Added an answer on May 17, 2026 at 3:52 pm

    gcc will generate ASM files. If you use gcc -Wa,-adhln -g [source.c] gcc and as will interleave the C source lines with the generated assembly code.

    clang with LLVM will generate high quality ASM files.

    Example:

    This C function:

    long Fibonacci(long x) {
      if (x == 0) return 0;  
      if (x == 1) return 1;
      return Fibonacci(x - 1) + Fibonacci(x - 2);
    }
    

    Becomes this ASM file:

    _Fibonacci:
    Leh_func_begin1:
        pushq   %rbp
    Ltmp0:
        movq    %rsp, %rbp
    Ltmp1:
        subq    $32, %rsp
    Ltmp2:
        movq    %rdi, -16(%rbp)
        movq    -16(%rbp), %rax
        cmpq    $0, %rax
        jne LBB1_2
        movq    $0, -8(%rbp)
        jmp LBB1_5
    LBB1_2:
        movq    -16(%rbp), %rax
        cmpq    $1, %rax
        jne LBB1_4
        movq    $1, -8(%rbp)
        jmp LBB1_5
    LBB1_4:
        movq    -16(%rbp), %rax
        movabsq $1, %rcx
        subq    %rcx, %rax
        movq    %rax, %rdi
        callq   _Fibonacci
        movq    -16(%rbp), %rcx
        movabsq $2, %rdx
        subq    %rdx, %rcx
        movq    %rcx, %rdi
        movq    %rax, -24(%rbp)
        callq   _Fibonacci
        movq    -24(%rbp), %rcx
        addq    %rax, %rcx
        movq    %rcx, -8(%rbp)
    LBB1_5:
        movq    -8(%rbp), %rax
        addq    $32, %rsp
        popq    %rbp
        ret
    Leh_func_end1:
    

    When you do this, you will want optimizations OFF.

    It is also possible to interleave the generated ASM code with the higher level source, such as the writer has done HERE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm witting a compiler and I'm searching for a library that could do type
Im searching a tool which allows me to specify some folders as bookmarks and
I tried searching the compiler errors on google, but it didn't even return a
I´m searching for a JBIG2 encoding library, which is free to use and runs
Searching for some sample code for converting a point in WGS84 coordinate system to
Searching for a string within a string is extremely well supported in .NET but
Searching on Google reveals x2 code snippets. The first result is to this code
While searching the interweb for a solution for my VB.net problems I often find
After searching online, the best solution I've found so far is to just make
Im searching for the best way to mantain combo box values within a Mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.