Questions about C (or C++?)
-
ComputerPsi
- Member

- Posts: 83
- Joined: Fri Oct 22, 2004 11:00 pm
Questions about C (or C++?)
Hello. I'm an assembly programmer. I got curious and decided to make a simple code that runs without an operating system with C. Does anybody know the appropriate compiler for this? A compiler that takes up little space and runs quickly (one that runs on Windows). Also, how would you configure or program it to work without an OS?
Hi ComputerPsi
on a windows platform you should probably use cygwin as a compiler. As its a port of the gcc compiler, which is used in the linux world, almost all tutorials that can be found on the internet should work just fine with it.
For a quick introduction to kernel development in C you might have a look at the bare-bones series from mega-tokyo (Bare Bones, C++, Higer Half). Apart from that there are two more tutorial on bonafide that might help you developing your kernel (Kernel in C++, Bran's Tutorial).
regards,
gaf
on a windows platform you should probably use cygwin as a compiler. As its a port of the gcc compiler, which is used in the linux world, almost all tutorials that can be found on the internet should work just fine with it.
For a quick introduction to kernel development in C you might have a look at the bare-bones series from mega-tokyo (Bare Bones, C++, Higer Half). Apart from that there are two more tutorial on bonafide that might help you developing your kernel (Kernel in C++, Bran's Tutorial).
regards,
gaf
-
ComputerPsi
- Member

- Posts: 83
- Joined: Fri Oct 22, 2004 11:00 pm
Interesting, I thought it was included in the standard installation..
Fortunately you don't have to have to reinstall everything as setup.exe allows you to simply add packages. Just run it once more and make sure that the following are selected:
You can select the packages right after the download-location dialogue. Not installed packages are marked with a 'skip' on their left. Just click on it to download the package.
regards,
gaf
Fortunately you don't have to have to reinstall everything as setup.exe allows you to simply add packages. Just run it once more and make sure that the following are selected:
Code: Select all
devel/binutils
/gcc-core
/gcc-g++
/make
/nasmregards,
gaf
though most people use some form of GCC (cygwin is best for windows systems), i want to be sure you are aware that this isnt your only option:
almost any c compiler will work (and many are availible free -- i make a habit of only mentioning free tools) -- some people prefer using the MS toolschain (the latest version is availible free on the MS website), or the older borland compilers (last i checked, they were giving all their old tools away free), and ive seen some people using watcom
if you are familier with a particular toolset (from app development) use it -- it will prob work fine, but if your not, cygwin has the most people familier with it in the OSdev comunity (and most tuts are designed to work with it), giving it an advantage
many assembers are also availible:
by far the most popular is nasm (availible both natively and in cygwin) but many people prefer fasm (which (iirc) also has the advantage of supporting 64bit code) -- gas and masm are both less popular (but equally valid) choices
as an asm programmer i assume you already have the latest manuals (intel hard copies just updated in june) from either Intel or AMD (there almost identical, though they are orginized a little differently)
(intel manuals can be downloaded and ordered in hardcopy from the link in my sig -- if you dont have them already)
almost any c compiler will work (and many are availible free -- i make a habit of only mentioning free tools) -- some people prefer using the MS toolschain (the latest version is availible free on the MS website), or the older borland compilers (last i checked, they were giving all their old tools away free), and ive seen some people using watcom
if you are familier with a particular toolset (from app development) use it -- it will prob work fine, but if your not, cygwin has the most people familier with it in the OSdev comunity (and most tuts are designed to work with it), giving it an advantage
many assembers are also availible:
by far the most popular is nasm (availible both natively and in cygwin) but many people prefer fasm (which (iirc) also has the advantage of supporting 64bit code) -- gas and masm are both less popular (but equally valid) choices
as an asm programmer i assume you already have the latest manuals (intel hard copies just updated in june) from either Intel or AMD (there almost identical, though they are orginized a little differently)
(intel manuals can be downloaded and ordered in hardcopy from the link in my sig -- if you dont have them already)
use codeblocks!(an ide) get the one that has the compiler included@ http://codeblocks.org
it is the best ide I have ever seen(of course its free and even opensource)
you can use my codeblocks file as a template if you want just download my release of JouleOS 0.0.4 at http://jouleos.galekus.com
(look under releases)
and well yea use codeblocks
it is the best ide I have ever seen(of course its free and even opensource)
you can use my codeblocks file as a template if you want just download my release of JouleOS 0.0.4 at http://jouleos.galekus.com
(look under releases)
and well yea use codeblocks


