title: Accessing ring 0 mode from user applications ( and why Borland allows this )
body: <p>As the semester's deadlines approach, I decided to start working on a project in Operating Systems course at my college. 
  The problem with the project assignment is that it requires students to develop a user application (<code>exe</code>) that will execute as a simple kernel ( basic process and thread management ). </p>
  
  <p>First thing that popped to my mind was : <em>How the hell am I supposed to execute privileged code in user application?</em></p>
  
  <p>After consulting with other students ( who did the project on time ), I learned that they were able to execute privileged code without problems using Borland 3.1 compiler. However, none of them found that weird nor knew why that worked. Why ( better question here would be <em>how</em> ) does Borland do this? Doesn't this violate fundamental principles of OS security?</p>
  
  <p><strong>Note:</strong> I added C++ tag because the project is supposed to be written as a C++ application, with most of the privileged code executed as inline assembly. </p>
  
  <p><strong>Update</strong> My question was somewhat poorly phrased originally. Of course I was able to compile code with privileged instructions with any compiler - running the code was the problem.  </p>