views:

140

answers:

5

Do they use Windows to write Windows? I don't know, but if they did and suddenly there was no more Windows, what would they use to re-write Windows?

A: 

pico nachos and gcc - any UW CS354 love out there?

johnny g
+1  A: 

I'd suggest checking out the resources on OSDev. There's a lot of information there, both in terms of what to expect when writing a kernel, and also how to go about it.

In general, however, most complex things have been written through a process of bootstrapping - writing a basic tool to allow you to create a more complex tool using the basic one, and then using the complex tool to create an even more complex tool, et cetera.

Amber
A: 

From the ground-up - what I'd do is to have a "read from mechanical source into RAM" set up, where the source binary read in would be a bootloader which could read a ROM. (ie, toggling switches) The bootloader would then contain the drivers to read the electronic signals from, say, a UART (serial port standard chip). On the other side of the serial port you might have a computer, which would send additional software to do whatever you want.

This is a standard problem for embedded systems. Eventually what usually happens is a bootloader is installed in a ROM chip - the CPU is defined to start reading ROM at a given address - the ROM address contains the instructions to jump to the bootloader code. A communications driver is installed (ie jtag or serial port), which then allows an external computer to install new device drivers for, say, a display and/or a keyboard.

Paul Nathan
+2  A: 

Your title makes good sense. But the second line in your question is hilarious... even though I get what you mean :D I had the same question long time back.

Same thing with machines. People use machines to build other machines today. What if there were all of a sudden no machines?... you start from scratch like pre-industrial revolution. Go one step back and use hand-tools to make machines and it starts all over. I guess people wrote Windows using compilers/tools in DOS and DOS using assembly and assemblers using direct machine codes and so on...

Whenever you get this doubt, think of it like this. You use hands to build a tool, use that tool to make a better tool, use that to make a better tool, etc... If at any point something happens to existing tools, you start with the best one you have available, even though it is a little outdated. Its really a simple concept, made to appear complex by the software development methodologies of today. Each (version of) operating system is only a tool to do something. You simply use the latest one available to build the next best one.

About the tools needed - This wiki is a wonderful place to start if you want to deal with OS development - http://wiki.osdev.org/Main_Page

Visual Studio 2008 Team System was used by the team in Microsoft to develop Visual Studio 2010 Team System. If what I saw in a video is correct, they even used the previous build of VS to write the next build! Your confusion is perfectly understandable.. they call it dogfooding.

Senthil
Yes, the title was the real question.
shogun
A: 

Windows is an OS not a language. They made windows using C, It doesn't matter which OS you compile it on. For eg windows 1.0 was written in C language and compiled on the DOS platform. It doesnt matter where you compile it.

As far as the kernel is concerned, most modern kernels have been created using C. A few of the critical subroutines are written in Assembly for speed.

Ram Bhat