I have a asm boot on a floppy disc and i want to show a c++ kernel (cuz c++ are easy). but how can i link it? I heared somethig about : extern _main call _main for asm. Can anyone help me? :'(

Recommended Answers

All 3 Replies

If you have a boot loader and you want it to execute a c program then the boot loader can't just simply use the call statement to do it. Your boot load will have to first load the c program into memory and then start executing it at the beginning of the program, which will normally NOT be main(). C compilers add a lot of code to the beginning of the program, and the last thing that startup code does is call main().

If this is a custom environment then you'll probably have to create a special linking/compiling process so your exe will execute.

In truth I'm not really sure what your after? The boot floppy, is it one you created or is it one you downloaded? The kernel I have the same questions, is it one you created or is it one you downloaded?

If this is a custom environment then you'll probably have to create a special linking/compiling process so your exe will execute.

In truth I'm not really sure what your after? The boot floppy, is it one you created or is it one you downloaded? The kernel I have the same questions, is it one you created or is it one you downloaded?

i dont have a kernel yet... but i wrote my own bootloader (very simple bootloader) and i have a USB floppy drive

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.