Page 1 of 1
good c compiler
Posted: Fri Nov 18, 2005 12:00 am
by robert macabre
i'm really tired of using asm, could somebody recommend a good (and free) c compiler for dos/windows aaaand maybe a tutorial on using c for os dev? i'm really new at this whole x86 c/asm thing, i'm used to using c and asm for palm os, but i've adjusted pretty well to the x86 assembly (but it's getting tedious). all of the windows programming i do now is in vb.net. i've been hanging around here as a "guest" for awhile now, i figured it was time to at least register. thanks in advance for any suggestions.
Re: good c compiler
Posted: Fri Nov 18, 2005 12:00 am
by earlz
32bit:
nasm compiler and mingw, mingw comes with devc++ or codeblocks(codeblocks is the best editor for C/C++ code i have ever seen btw and that is counting msvc++)
i dont really know how to get a pure binary working with devc++ but i have done it myself with code blocks and have not regretted the time i put into it. If you need any help you can email me @
[email protected]
16bit:
TurboC and buying tasm is the only good combination that really works in 16bit i know of but miracleC is another C 16bit compiler but i dont know if it can compile to raw binary
Re: good c compiler
Posted: Sat Nov 19, 2005 12:00 am
by bluecode
hi,
The people from mega-tokyo
don't suggest using MinGW/DevC++. You should
use Cygwin or
DJGPP instead. I would prefer cygwin over DJGPP
C tutorials:
Bare Bones
Higher Half Bare Bones
If you want to use C++, then the
this is a good reference.
If you've got any problems with C++ you could mail me (bluecoder AT gmx DOT de) or ICQ me (213049258).
Hope this helps!
Re: good c compiler
Posted: Sun Nov 20, 2005 12:00 am
by Legend
Well, Cygwin seems to ignore -fno-leading-underscore, so I went from Cygwin to MinGW ...
Re: good c compiler
Posted: Sun Nov 20, 2005 12:00 am
by JAAman
no, they also recommend avoiding DJGPP (as should anyone), which is running inside like 7 layers of emulation in order to run a 32bit compiler inside a psudo-32bit environment, inside a emulated 16bit RMode environment, hosted by a true 32bit OS emulation layer, running on a 32bit kernel
minGW themselves say that it is not suitable for use in OSdev work so try cygwin (im sure there is a way to get -fno-leading-underscore to work)
or you could use the MS compiler: its also free (its always free for the non-optimizing compiler, but for the next year they are giving away the fully optimizing compiler, plus visual studio, free), or you could try some of the other compilers (there are many free ones) but not as many people will be familier with it and therefore you will be able to get less help with compiler-related problems
Re: good c compiler
Posted: Sun Nov 20, 2005 12:00 am
by earlz
doesn't ms compiler support intel syntax inline asm
if they don't does anyone know of one that does
and you are talkiing about microsoft's compiler right?
Re: good c compiler
Posted: Sun Nov 20, 2005 12:00 am
by robert macabre
hey thanks everyone
and they're giving away visual studio next year? i didn't think that would happen for awhile. weeeeird.
Re: good c compiler
Posted: Mon Nov 21, 2005 12:00 am
by bubach
Re: good c compiler
Posted: Mon Nov 21, 2005 12:00 am
by JAAman
yes Microsofts compiler (which uses the masm assembler) ONLY excepts intel syntax
and yes Visual Studio is free on their website (though the free version doesn't include MFC)
heres the link to the main page for visual studio express (the free version is called express)
http://msdn.microsoft.com/vstudio/express/default.aspx
if you download it between
nov 7 2005
and
nov 7 2006
then it is free! (if you wait till after nov 7 2006, it will cost $50)
the MS compiler has ALWAYS been free but doesn't come with any IDE (and has, until recently, not included any optimization)
Re: good c compiler
Posted: Tue Nov 22, 2005 12:00 am
by boot_rom
i run a number of c compilers. but as a start open watcom is best choice. you get an ide, c/c++ compiler and much more. the documentation is very very good. it once was a commercial product but now is free. and it also has an assember. so you always know where to return to

Re: good c compiler
Posted: Tue Nov 22, 2005 12:00 am
by earlz
yes i must agree the docs are good
i installed it and havent used it at all but havent uninstalled it because of the docs