Oberon Operating System
When people ask &quot;how would you write an operating system without C?&quot;, Oberon is what I point them to.  It&#x27;s a very different style than Unix, in that the Oberon language is a relatively integrated part of the operating system, rather than communication being through a machine-level ABI.  There were some spiritual predecessors where the compiler <i>itself</i> was part of the OS, and there was no other way to communicate with it than through the language semantics.  I&#x27;m not completely sure whether Oberon works like that, but some Concurrent Pascal systems did.  It&#x27;s a very different view of what an &quot;operating system&quot; means.<p>Anyway, Oberon is a memory-safe and garbage-collected language without the pointer trickery that makes C so dangerous.  So how does Oberon implement the necessary low-level parts?  Fortunately, some version of the source is easily browsable online: <a href="https:&#x2F;&#x2F;people.inf.ethz.ch&#x2F;wirth&#x2F;ProjectOberon&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;people.inf.ethz.ch&#x2F;wirth&#x2F;ProjectOberon&#x2F;index.html</a><p>Here is for example Kernel.Mod: <a href="https:&#x2F;&#x2F;people.inf.ethz.ch&#x2F;wirth&#x2F;ProjectOberon&#x2F;Sources&#x2F;Kernel.Mod.txt" rel="nofollow">https:&#x2F;&#x2F;people.inf.ethz.ch&#x2F;wirth&#x2F;ProjectOberon&#x2F;Sources&#x2F;Kerne...</a><p>Low-level operations are done with magical functions that simply perform an operation on a memory address identified with an integer, e.g. `SYSTEM.PUT(q0+8, q1)`.  These are then presumably handled directly by the compiler (the System.Mod file does not define any PUT function).  This is syntactically more awkward than the equivalent in C (`q0[2] = q1`, assuming this is an `int` pointer), but perhaps things that are unchecked and potentially dangerous <i>should</i> be syntactically awkward.  It&#x27;s not like a lot of code will be written using these facilities.