Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm wondering that i have got Borland C++ 6.0. And it has got BCC32 file. With this, i'm compiling a c file. And it is creating an object file. (file.obj).
Question 1: Is this object file 32 bit?
Question 2: Can i use this object file for writing my kernel?
1. Newer compiler don't support 16bit anymore. So most likely it is 32bit
2. Why not, if the file meets certain conditions: No external libraries that rely on os specific functions. And you should compile with the C compiler, because c++ requires additional supporting functions for some features (exception handling, rtti, new/delete, pure virtual functions)
Another thing is, that your bootloader has to support the executable format you choose for your kernel and the bootloader has to switch to 32bit protected-mode obviously
I don't know *anything* about Borland's C++ compiler, but there's a bit in the Wiki about doing kernels in C++ using G++, so if you were able to find Borland equivelants of the command-line arguments given here...
It might be less work to just install gcc, than figure out how to do it with Borland...
If you want a nice GUI for gcc, I'm sure Dev-C++ can be configured for kernel development too. It comes with MinGW for Windows development (and MinGW is NOT a good idea for kernel stuff), but shouldn't be too hard to configure for another gcc (ELF enabled Cygwin?). Dev-C++ does support several compilers out of the box anyway.
I haven't tried yet myself, but I'm planning to, since I use Dev-C++ anyway for Windows stuff and it can happily use several compilers. That'd let me develop on a Windows box (instead of remote developing on my Linux box).
Dev-C++ isn't the most stable thing on the planet, but I haven't so far seen it crash so badly that it wouldn't let me save and restart without problems.
Well If thats ld from borland package I'ld say It's rather strange unless you've changed object file format in compiler and did'nt inform linker about it.
Maybe you will find something here http://edmulroy.portbridge.com/howto.htm or here http://info.borland.com/techpubs/bcppbu ... s/pro.html
I had similar problem to you - don't like AT&T- so I'm writing most of may asm code in seperate files and use NASM which is similar to Intel notation.
Tolga wrote:
I want to use Borland C++ for Intel Styled assembly. GCC is using AT&T styled assembly.
Assembly style isn't an issue since you can choose AT&T or Intel style syntax using a gas directive .intel_syntax ... Just don't forget the .att_syntax at the end of your code as gcc expect this.