rdos wrote:Besides, all C compilers I know of (admittedly only BCC, M$ and OpenWatcom) at a minimum has a startup-stub which is in the runtime-library. You ALWAYS must link this stub with your C code.
I don't know about BCC, M$ and OpenWatcom, but GCC has several options for
not doing this (-nostartfiles, -nodefaultlibs, -nostdlib, -fno-builtin). Yes, you can make GCC output only exactly what you wrote into the binary.
And as gerryg400 said, using C isn't necessarily about portability, but maintainability. (And development efficiency, available help and examples, plus a number of other reasons.)
No professional will
ever recommend writing a project this size completely in assembler.
And after all these years, I have
still to see a thread where someone asks the compiler question, gets pointed to the Wiki (our variant of a "FAQ"),
and no-one comes up with "you don't need a cross-compiler" or "you should write your own bootsector" or "just write it all in assembler".