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
32 C Compiler
Re:32 C Compiler
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).
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
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
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
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:32 C Compiler
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
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
the only limitation on the free one is that it doesn't include MFC, which hardly matters for OSdev purposes
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:32 C Compiler
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
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)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
THe Platform SDK can be downloaded from here
Re:32 C Compiler
Ooh... free graphical Windows program compiler... with form designer... I can finally make a Windows-based installer for my OS!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