Page 1 of 1
32 C Compiler
Posted: Mon Dec 19, 2005 2:46 pm
by Tolga
Hi!
I saw several C kernel example. But I want to a 32 Bit C compiler. And it must be support Intel Style assembly.
I found GCC but it don't support Intel Style Assembly. How can i find it?
Thanks
Re:32 C Compiler
Posted: Mon Dec 19, 2005 3:34 pm
by nick8325
Actually, GCC can support Intel syntax for assembly language, though I've never tried it myself. If you pass the -masm=intel option to GCC, it will emit Intel syntax assembly language and instruct the assembler (using .intel_syntax) to use that.
The form that it expects for Intel syntax is at
http://sourceware.org/binutils/docs-2.16/as/i386_002dSyntax.html - it seems to be fairly normal.
GCC and AS don't understand about segmentation at all, though. Watcom does - you can get it from
http://www.openwatcom.org. It has good support for ASM, and it's much faster than GCC on old machines while still generating decent code. Its generated code isn't as good as GCC's, though, and its linker isn't so good (when I used Watcom I used ld as the linker).
Also, there hasn't been a new version released in over a year, but it looks like there's a new beta version ready (released last week).
Re:32 C Compiler
Posted: Mon Dec 19, 2005 10:47 pm
by carbonBased
Or you could just separate your asm into a separate file and build it via an intel syntax assembler (of which there are many).
In my opinion, inline assembly is evil. It's not portable, and doesn't appear to belong in a nicely formatted ansi c source file... but... just my opinion.
--Jeff
Re:32 C Compiler
Posted: Tue Dec 20, 2005 8:48 am
by kataklinger
You can use Intel C++ compiler. I think there's a free version which you can down load from Intel websuite.
Re:32 C Compiler
Posted: Wed Dec 21, 2005 9:38 am
by JAAman
or you can use the MS compiler -- its also free -- in the past the free one has been laking the optimizer -- but not now you can get the full thing free (even the IDE) go to the MS website and download Visual Studio Express, its free if you download it before november 7 2006
the only limitation on the free one is that it doesn't include MFC, which hardly matters for OSdev purposes
Re:32 C Compiler
Posted: Wed Dec 21, 2005 11:47 am
by kataklinger
MS compiler is good choice if you are using Windows (I used to compile my os with it, but now I'm using Intel's and they are almost 100% compatible), but what if he using Linux
Re:32 C Compiler
Posted: Wed Dec 21, 2005 6:56 pm
by Ytinasni
JAAman wrote:or you can use the MS compiler
...
the only limitation on the free one is that it doesn't include MFC, which hardly matters for OSdev purposes
MFC is part of the Platform SDK, as well as all the windows libraries and headers. (The only libraries that come with VC Express are the c/c++ standard libraries)
THe Platform SDK can be downloaded from
here
Re:32 C Compiler
Posted: Wed Dec 21, 2005 11:43 pm
by Candy
JAAman wrote:
or you can use the MS compiler -- its also free -- in the past the free one has been laking the optimizer -- but not now you can get the full thing free (even the IDE) go to the MS website and download Visual Studio Express, its free if you download it before november 7 2006
the only limitation on the free one is that it doesn't include MFC, which hardly matters for OSdev purposes
Ooh... free graphical Windows program compiler... with form designer... I can finally make a Windows-based installer for my OS!