Page 1 of 1
Writing an OS for x86-64 architecture...
Posted: Fri Aug 12, 2005 11:00 pm
by hurrikam
Hi, I'm new to this forum and to OS writing too. I'd like to start writing something that would be similar to a very simply os. I've theorical basis about an os is internally composed and how it communicates with the machine, how assembly works and it's basis rules, but I've never written anything like this before. I've taken a look at "HowTos and Tutorials" section and I found it very useful to start, especially because I'd like to use C++ (one of the languages I better own) and assembly in this my fool little adventure
. My first real question is this: are there IDE or just simple C++/asm compiler that support x64 native code yet? CGG can compile code for x64? And what about assembly compiler? I found on the web a compiler called "Flat assembler compiler". It seems pretty...
'Cause I really would start something different by usual high-level apps, I'll hope my questions could be taken seriously and wait for any kind answer and suggestions about first steps in os developing.
Thanks everybody,
Hurrikam
Re: Writing an OS for x86-64 architecture...
Posted: Fri Aug 12, 2005 11:00 pm
by carbonBased
64-bit IDEs? Probably. What aspect of an IDE would you consider to be compiler/architecture specific? Depending on which features you're using, any IDE will probably work, as long as you can define it to use 3rd party compilers.
Can CGG compile code for x86-64? I'm assuming you mean GCC... in which case, yes, if you have compiled it with such support enabled.
http://www.x86-64.org/ has downloads for such builds. By the way, do you actually have an x86-64 bit platform? If not, you're going to require a cross compiler... I suspect you'll have to compile that yourself.
64-bit assembler? The linux kernel has assembly language in it (of course) so there must be an x86-64 enabled assembler in the x86-64 binutils package.
--Jeff
Re: Writing an OS for x86-64 architecture...
Posted: Fri Aug 12, 2005 11:00 pm
by hurrikam
Thank you for answering.
I'm working on Win XP x64 version (obvious having a 64bit machine, an AMD Athlon 64). Win x64 version doesn't run any compiler like GCC (yes, I meant GCC, not CGG) or GPP (DJGPP), so I've to switch to standard 32 bit Win XP version to compile my C sources.
About IDEs, I'm referring to IDE's such as Visual Studio 2005 that includes native x64 architecture compiler and linker, but I suppose it's Win dependent as usual, so I image I'd to use a simple editor to write C++ code and continue using cgg or gpp.
About asm, by what I've red about nasm and yasm, I should be able to generate binary files for x64 machine.
Any other suggestion is welcome.
Thanks again,
Hurrikam
Re: Writing an OS for x86-64 architecture...
Posted: Fri Aug 12, 2005 11:00 pm
by carbonBased
Yes, you'll probably want to stick with GCC, but that doesn't mean you need to get rid of Visual Studio. If you want to, you can configure visual studio to execute GCC when building. In fact, at my job we have a visual studio project which executes a batch file, which executes an ant script, which builds a motorola project using a GCC cross compiler...
This is what I meant previously. A good IDE should be usable... you should be able to configure it for your use.
Cheers,
Jeff