hello im just started working on a basic OS and i have a few questions that i hope some one can help me with.
1. i wrote a basic bootsector and i would like to write the kernel in C++ but do i have to recreate all the C++ functions in ASM? (i saw an examble were they did that with C). or do i have to write most of the kernel in ASM?
2. also my asm is realy bad any one know of a good tutorial site?
Jason Bird
[email protected]
ASM/C++ question
RE:ASM/C++ question
Well, if you are wanting to use C++, you have to remember a few special problems when doing it.
As long as you write an appropriate wrapper in assembly for your code, you should be alright when using a C++ kernel. You must also understand that C++ usually does some things like function name distortion that you have to ignore (extern "C" { } ) Also, some basic C++ functions like new and delete will no longer be avaliable unless you code them yourself. Other than that, I have seen kernels work using C++, without writing most of the kernel in ASM.
You just have to make sure you do it right.
As long as you write an appropriate wrapper in assembly for your code, you should be alright when using a C++ kernel. You must also understand that C++ usually does some things like function name distortion that you have to ignore (extern "C" { } ) Also, some basic C++ functions like new and delete will no longer be avaliable unless you code them yourself. Other than that, I have seen kernels work using C++, without writing most of the kernel in ASM.
You just have to make sure you do it right.