title: How a program become independent of OS?
body: <p>What exactly do we mean when we say that a program is OS-independent? do we mean that it can run on any OS as long as the processor is same?</p>
  
  <p>For example, OpenGL is a library which is OS independent. Functions it contain must be assuming a specific processor. But ain't codes/programs/applications OS-specific?</p>
  
  <p>What I learned is that:</p>
  
  <ol>
  <li><p>OS is processor-specific.</p></li>
  <li><p>Applications (programs/codes/routines/functions/libraries) are OS specific.</p></li>
  <li><p>Source code is plain text.</p></li>
  <li><p>Compiler (a program) is OS specific, but it can compile source code for a<br>
  different processor assuming the same OS.</p></li>
  <li><p>OpenGL is a library.</p></li>
  </ol>
  
  <p>Therefore, OpenGL has to be OS/processor-specific. How can it be OS-independent?</p>
  
  <p>What can be OS independent is the source code. Is this correct?</p>
  
  <p>How does it help to know if a source code is OS-independent or not?</p>