Search code examples
coperating-systemstandard-library

Using library functions in home-made OS


I am interested in programming my own OS from scratch(in C). However, every tutorial I encounter has made a message print on the screen by writing directly to the VDU. Why can't I use standard library functions while writing my OS? I don't have much problem in writing directly to the VDU. However, it sometimes makes my mind utterly confused(especially in large programs).

Are the library functions not converted into the same low-level code as the functions created by us?


Solution

  • This is a kind of chicken-and-egg problem: Standard library functions use OS functions to print to the screen (deep down there, someone actually needs to write directly to the hardware).

    Without an OS (because you just start writing one) this will not work. The standard library you want to use will need to be written specifically for and together with your OS.