Jump to content

Language

Featured Replies

IIRC, at least some of the OS has to be written in assembly.

 

A quick google search yielded this site, which skims over stuff pretty well, IMHO.

As I understand it, system software is typically written in C or C++ using procedural methods (with some OOP mixed in whenever they can get away with it). Lower-level stuff is sometimes written in processor-specific Assembly-language packages which are incorporated into C++ wrappers, in a sense. So, for example, you can write an entire operating system in a C++ integrated development environment (such as Borland or MS Visual Studio).

 

In terms of the industry at large, the question is a really interesting one, because virtually all programming language development over the last decade, and virtually all development looking forward, is based on what they call "managed code" -- i.e. either an interpreter or a just-in-time compiler or some sort of dynamic library-like infrastructure, as we see with Java or .NET. The point being that you can't write an operating system in something like that, because you need the infrastructure to be in place, and the infrastructure has to reside in an operating system.

 

And so system software is kinda stuck in the dark ages of C and C++.

Like Pangloss said, an operating system is usually written in C or C++. I once tried to write an operating system myself. My goal was to use the Linux kernel and find a way to make it compatible with software for all the other operating systems. I worked on it using Borland, but I could never get the GUI to work. It always tried to start the operating system in a DOS command prompt and then it crashed. I eventually gave up and deleted the operating system.

At one time iirc it was all done in assembly, but we're moving to higher level languages now thanks to CPU advances pushing the envelope on the capacity of BIOS and machine language.

 

Yay for advances!

all the ones I`m familiar with are done in Machine code or assembly lang (if you have the interface tables). I`ve no idea about later more modern OS`s.

Like Pangloss said, an operating system is usually written in C or C++. I once tried to write an operating system myself. My goal was to use the Linux kernel and find a way to make it compatible with software for all the other operating systems. I worked on it using Borland, but I could never get the GUI to work. It always tried to start the operating system in a DOS command prompt and then it crashed. I eventually gave up and deleted the operating system.

 

 

Why didn't you base it on the windows kernel and try and make it compatible with all the others os's?

 

It depends what the OS system is for in my experiance, I guess you're talking about normal desktop os's in which case C is very popular. But if you're talking about other devices then it could be pretty much anything, but in most cases for small things assembly is very offten used, a friend just wrote a little robot os in it...

Why didn't you base it on the windows kernel and try and make it compatible with all the others os's?

 

The Windows source code is kept locked away somewhere. In fact, it once leaked out and Microsoft called the FBI.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.