gcc/Mac?
Moderator:Moderators
How would I get to the level of writing the kernel in C or C++ using a Mac and the gcc, ld, and nasm? I can't seem to port the code to work with GCC, and configuring it with proper flags completely mystifies me. Is there anyone here who has made this work?
3.141592653589793
Here is a link to an old tutorial that shows how to use gcc and ld to write a kernel.
http://www.osdever.net/bkerndev/bkerndev.zip
it goes about initialization in a different way although it shouldn't be hard to take this example and apply it to the brokenthorn method.
You will have to remove all the MSCV specific code. Also, you will only be able to do inline assembly using AT&T style asm, not nasm style.
http://wiki.osdev.org/C_PlusPlus
Here is a page that will show you how to do the global constructors and destructors code.
Have fun,
~Andrew
http://www.osdever.net/bkerndev/bkerndev.zip
it goes about initialization in a different way although it shouldn't be hard to take this example and apply it to the brokenthorn method.
You will have to remove all the MSCV specific code. Also, you will only be able to do inline assembly using AT&T style asm, not nasm style.
http://wiki.osdev.org/C_PlusPlus
Here is a page that will show you how to do the global constructors and destructors code.
Have fun,
~Andrew