Archived

This topic is now archived and is closed to further replies.

En3my

Free C compiler?

Recommended Posts

En3my    122
Hi, I am in the process of learning x86 assembly language, and as a "reverse" part of the learning I would like to see what a compiler does to C code. Anyone know of a free ANSI C compiler with disassembly functionality? At the moment I have a Windows XP system, but next week I will install Linux as well. Thanks a million!

Share this post


Link to post
Share on other sites
Null and Void    1088
If you don''t mind it defaulting to AT&T-style assembly output (it can be set to Intel-style assembly with "-masm=intel") GCC has probably the best mainstream pure-C compiler out there. Free (in both ways) of course.

GCC is virtually the only compiler used for Linux development (Intel''s compiler is used a bit, and other unixes use their own compilers sometimes). Dev-C++ comes with GCC''s C and C++ compilers if you want a quick and easy to install build for Windows (you can use them at the command line if you''d like).

Share this post


Link to post
Share on other sites
Xanth    122
I think some of them more recent versions of GCC use the Intel syntax. I can''t confirm it, I just remember reading it somewhere.

Share this post


Link to post
Share on other sites
Leffe    301
3.2 doesn''t, I doube they changed something like that for 3.3.

It might be possible to ... wait a second, are we talking the inline asm, or the output to [g]as(if as is used?) or err... nevermind, go read some manuals I sure have to.. is gas really used in the compile process?

Share this post


Link to post
Share on other sites
LessBread    1415
lcc-win32 A free C compiler for windows, only a 3 MB download. The -S switch will generate an .asm file from your C sources - using AT&T syntax as well.

There''s also a new C compiler based on lcc that uses Intel syntax, but I haven''t played around with it that much. Pelle''s C

Share this post


Link to post
Share on other sites