• 0

How to build an operaing system ?


Question

Recommended Posts

  • 0

I can tell you that Windows is written in C and C++, with small amounts of assembly in places. Linux, mostly C++ from what I understand. DOS, who knows (or cares) ;)

How to test an OS? Get it to boot successfully and not crash.

To write a boot sector to start your OS, you will probably need to know some assembly.

Windows 9x (95, 98) run on top of DOS. Windows ME does not, but it is very unstable. Windows NT (NT4, 2000, XP, and on) do not run on DOS or anything else. The bootloader (NTLDR) directly loads the NT kernel. I don't know what you mean by "designed system".

To give you an idea of what you're talking about, Windows NT was started in the early 90s by a small team of people which quickly grew to a team of over 400 people, and now the NT team consists of several thousand people. Windows Server 2003 (the most recent version of Windows NT) has roughly 50 million lines of code, and takes several hours to compile on a server farm. Granted, any hobbyist OS isn't going to be nearly the size of today's Windows, but even linux has been around for about 10 years now, and was based on Unix, which has been around virtually forever in computer years.

  • 0
the only one i think i can anser is hte one that deals with dos

IIRC, windows 2000, xp, 2003 and of course longhorn dont use dos as an underlying system

585120924[/snapback]

Ok, but why when i setup WINDOWS XP in DOS !! ( when i goto in DOS and run smartdrv.exe then goto i386 and then winnt.exe ) that means that windows depends on DOS

also try to remove the 3 DOS files msdos.sys , io.sys, command.com , u will face a lot of troubles ........ all of that prove that Windows depends on DOS

  • 0
I can tell you that Windows is written in C and C++, with small amounts of assembly in places. Linux, mostly C++ from what I understand. DOS, who knows (or cares) ;)

How to test an OS? Get it to boot successfully and not crash.

To write a boot sector to start your OS, you will probably need to know some assembly.

Windows 9x (95, 98) run on top of DOS. Windows ME does not, but it is very unstable. Windows NT (NT4, 2000, XP, and on) do not run on DOS or anything else. The bootloader (NTLDR) directly loads the NT kernel. I don't know what you mean by "designed system".

To give you an idea of what you're talking about, Windows NT was started in the early 90s by a small team of people which quickly grew to a team of over 400 people, and now the NT team consists of several thousand people. Windows Server 2003 (the most recent version of Windows NT) has roughly 50 million lines of code, and takes several hours to compile on a server farm. Granted, any hobbyist OS isn't going to be nearly the size of today's Windows, but even linux has been around for about 10 years now, and was based on Unix, which has been around virtually forever in computer years.

585120935[/snapback]

thats great but what the first step to make an operating system, BTW i mean DESIGNED SYSTEM as a system with colours and some graphic for begginers and you can do all WINDOWS operations through DOS , is that true ?

  • 0
also try to remove the 3 DOS files msdos.sys , io.sys, command.com , u will face a lot of troubles ........ all of that prove that Windows depends on DOS

585120942[/snapback]

I 75% sure that windows (NT and up) only use DOS to load, not to run (unlike 9x).

Once windows is loaded, it dones't depend on DOS any more.

Once more.. I'm not 100% sure of this, it's just my way of seeing it. :rolleyes:

  • 0
Windows xp runs an emulated dos.

585120959[/snapback]

ok so tell me what is the files which make windows depends on emulated DOS ,

as i think smartdrv.exe makes the computer thinks that its working on winxp ( but you exactly working on DOS ) , u use that file to fast the windows xp setup process through DOS . i will call that file as EMULATED WINDOWS FILE

  • 0
I 75% sure that windows (NT and up) only use DOS to load, not to run (unlike 9x).

Once windows is loaded, it dones't depend on DOS any more.

Once more.. I'm not 100% sure of this, it's just my way of seeing it.  :rolleyes:

585120961[/snapback]

yes u right but we must say that dos files was the KEY files to make you start windows ( without them no windows )

  • 0
yes u right but we must say that dos files was the KEY files to make you start windows ( without them no windows )

585120978[/snapback]

I'll say yes....I think all OS has a dependancy on a command line-based system.

Even Linux...and fancy as you can get the GUI with X, it's still sitting on a comand line.

BTW: the best solution to find out if Window is dependant on DOS should be e-mail Microsfot and ask them about it. It'll take aobut 1 week for them to reply tho...

  • 0
Ok, but why when i setup WINDOWS XP in DOS !! ( when i goto in DOS and run smartdrv.exe then goto i386 and then winnt.exe ) that means that windows depends on DOS

also try to remove the 3 DOS files msdos.sys , io.sys, command.com , u will face a lot of troubles ........ all of that prove that Windows depends on DOS

585120942[/snapback]

Windows versions based on the NT kernel (ie: NT 3.x - Windows XP/2003 Server) do not require these files.

In essence, the PC's boot goes like this:

The BIOS runs the POST (power-on self test) "hey, do we have memory in here? how much? any glaring problems with it? drives? cpu speed? everything in basic working order? alright, let's start to boot! Now, where's that MBR?"

The MBR (master boot record) is loaded off the hard drive, which specifies the actual location of the logical boot drive (what are we gonna be booting from?) after which the actual bootstrap code is executed which loads the necessary boot files for whatever OS you are running. Depending on the OS, different MBR code is written, which calls different bootstrap files.

In the case of old school DOS, it went something like this: IO.SYS came first, basically to handle, well, input/output tasks - low level stuff (most likely written in pure assembly). Next came MSDOS.SYS, basically the DOS "kernel" - this is what we relied on to run apps and whatnot - applications would "hook into" the kernel for basic tasks - ie: how was the file system going to be organized? what got loaded into memory where? I could be a little off here, mind you - it's been a while. Some parts of MSDOS.SYS may be low level (ie: written in assembly), but I'd reckon a good chunk of it was probably written in C or an equivalent high level language. Next, to actually interface with the OS, we had COMMAND.COM - this was our command interpreter (ie: what we saw on the screen which let us interface with DOS, type commands and such, execute programs, etc.).

By the way, to further add to the confusion, in Windows 9x, Microsoft did away with MSDOS.SYS (its function being encapsulated into IO.SYS).

Perhaps this helped? The hell if I know what I'm talking about - it has been a while for me :)

  • 0
Windows versions based on the NT kernel (ie: NT 3.x - Windows XP/2003 Server) do not require these files.

In essence, the PC's boot goes like this:

The BIOS runs the POST (power-on self test) "hey, do we have memory in here? how much? any glaring problems with it? drives? cpu speed? everything in basic working order? alright, let's start to boot! Now, where's that MBR?"

The MBR (master boot record) is loaded off the hard drive, which specifies the actual location of the logical boot drive (what are we gonna be booting from?) after which the actual bootstrap code is executed which loads the necessary boot files for whatever OS you are running. Depending on the OS, different MBR code is written, which calls different bootstrap files.

In the case of old school DOS, it went something like this: IO.SYS came first, basically to handle, well, input/output tasks - low level stuff (most likely written in pure assembly). Next came MSDOS.SYS, basically the DOS "kernel" - this is what we relied on to run apps and whatnot - applications would "hook into" the kernel for basic tasks - ie: how was the file system going to be organized? what got loaded into memory where? I could be a little off here, mind you - it's been a while. Some parts of MSDOS.SYS may be low level (ie: written in assembly), but I'd reckon a good chunk of it was probably written in C or an equivalent high level language. Next, to actually interface with the OS, we had COMMAND.COM - this was our command interpreter (ie: what we saw on the screen which let us interface with DOS, type commands and such, execute programs, etc.).

By the way, to further add to the confusion, in Windows 9x, Microsoft did away with MSDOS.SYS (its function being encapsulated into IO.SYS).

Perhaps this helped? The hell if I know what I'm talking about - it has been a while for me :)

585120987[/snapback]

no really that helps , i wonder how this 3 intelligent dos files recognize all of that which are you talking about on different pcs with different bios and different devices ....... ohhhh amazing ........ i think IO.sys has the responsibility for this task.

  • 0

I will ask microsoft about that but i hope they give me their secrets , i think they will answer this mainly :)

now, i think you all agreed that dos written in pure assembly so that mean assembly was programmed by machine language

------------------------

i g2g i will check this thread l8er to find out ur thoughts about this subject

  • 0
Ok, but why when i setup WINDOWS XP in DOS !! ( when i goto in DOS and run smartdrv.exe then goto i386 and then winnt.exe ) that means that windows depends on DOS

also try to remove the 3 DOS files msdos.sys , io.sys, command.com , u will face a lot of troubles ........ all of that prove that Windows depends on DOS

585120942[/snapback]

XP Setup doesn't have to be performed from DOS. You can boot from either the XP CD or the appropriate floppy disks and start the setup routine.

Those three files you listed are essentially DOS itself. Notice that XP (or any version of NT for that matter) do not install or require any of these three files, nor will it use them if they exist. XP will, however, execute autoexec.bat IF it exists, but it is not required to perform startup configurations.

  • 0
I'll say yes....I think all OS has a dependancy on a command line-based system.

Even Linux...and fancy as you can get the GUI with X, it's still sitting on a comand line.

BTW: the best solution to find out if Window is dependant on DOS should be e-mail Microsfot and ask them about it. It'll take aobut 1 week for them to reply tho...

585120985[/snapback]

Every OS depends on a lower, command-line based system? Not necessarilly. What "system" do Macintosh OSes (besides OSX) run on? What does NT run on? Itself. I can tell you that's a fact (at least for NT) because for one, there's no command line interpreter (cmd.exe, command.com, etc) even running on NT until the user launches it (via the graphical shell) or the registry is configured to boot with it.

Edit: But by the time the registry is launching apps, NT is well past the "boot" stage...

  • 0
no really that helps , i wonder how this 3 intelligent dos files recognize all of that which are you talking about on different pcs with different bios and different devices ....... ohhhh amazing ........ i think IO.sys has the responsibility for this task.

585121002[/snapback]

Well, that's kind of the idea. In the old primitive days, on a variety of platforms, it was not uncommon for an application diskette to also load a self-contained OS. The idea of having a centralized OS to take care of certain tasks really frees up the programmer. Remember running Wordperfect for DOS? The interface was built by the programmer from the ground up - everything from how the program looked and felt, to how you opened files, saved files, etc. All of the "graphics" and interface elements were designed by the programmer from the ground up. DOS provided the programmer a base on which to design an application - ie: it provided 1) support for a file system 2) support for accessing memory and I/O devices 3) support for modifing that file system, but it was up to the programmer to implement those things. When a programmer designs a basic windows app (let's not get into dot net and all that fun stuff just yet), they have more options. Windows already provides them a common interface that they can just modify based on specific settings for their apps. Literally, the application says "Hey, Windows, draw a window for me here!" and Windows obeys. That frees up a considerable amount of time for the programmer: time he can spend on doing other important things. At best, under DOS, an application could say "hey, DOS, I'm about to write data to the file system!" and DOS will obey - but the interface to writing that data (ie: the dialog box or whatnot) is all up to the programmer to design. Windows already does that for you via its API (application programming interface, I believe). Of course, you can make custom dialogs, et al, if you wish. But that's another story altogether.

Yes, in every operating system, you need a method to actually access the PHYSICAL hardware. Note that it's probably not a good idea for an application to be sending writes directly to the HD controller. It's probably more sane that there be an intermediary layer to handle that. Basically, the programmer shouldn't have to know the inner workings of computer hardware in order to write their apps. So that's what it basically comes down to: an operating system, in essence, allows programmers to develop applications without necessarily knowing all the fine points of how data is physically sent through the bus, to the hd controller, and how the controller then passes the data off to the drive itself, where it is then written to tiny rust particles. All the programmer needs to know is that there is a function called SaveFile() which takes care of all this stuff for them and they can call that function whenever they need to save something. Once again, I could be wrong. I drank a lot tonight, and it's been a while :)

  • 0

The linux kernel is written almost entirerly in C. DOS was written in assembly, although I believe parts of it have been rewritten in C over the years. The NT kernel, cornerstone of modern Windows, is written in C and C++.

Like morficus said, any Windows system based on the NT kernel uses legacy dos methods of booting itself. This isn't the same as Windows 9x and ME, which run on top of dos but include a GUI. Notice how we no longer worry about conventional memory, expanded memory, etc. The memory manger for the NT kernel is completely different from DOS.

Depending on what you're looking for, writing an operating system can be relatively simple (minimal, no drivers, no userland tools, uniprocessor) or massively complex (clustering, support for multiple architectures, drivers). Assuming you want to build an OS for the x86, you'll certainly need to use assembly to write certain parts of it (like the bootloader).

Uhm, if you want scientific information you're looking in the wrong place. You can google the topic, which will probably give you plenty of information on how to program your own mini operating system, but, if you're serious, most universities with computer science/computer engineering classes will have operating system design courses and an extensive library to research from. Don't forget most computer science people will want you to be specific when you talk about an operating system, such as linux. Linux is the kernel. Most userland tools (command line, system libraries, gui, etc) that make it useful are written by the fine people at gnu.org. Thus the you'll often see Linux as a whole refered to as "GNU/Linux".

That said, here's your answers in brief:

Assembly/C/C++, You can't, yes, no.

  • 0
Every OS depends on a lower, command-line based system? Not necessarilly. What "system" do Macintosh OSes (besides OSX) run on? What does NT run on? Itself. I can tell you that's a fact (at least for NT) because for one, there's no command line interpreter (cmd.exe, command.com, etc) even running on NT until the user launches it (via the graphical shell) or the registry is configured to boot with it.

585121040[/snapback]

Yeah, command-line system is a very bad way to describe it and isn't nearly accurate. Hell, even Linux doesn't really have a command based system that it starts up on. The command line you get is something initiated by the run-time level. Command lines are what the user puts input into the system through. What's really meant is a text mode based system, although even that doesn't really do it justice.

  • 0
no really that helps , i wonder how this 3 intelligent dos files recognize all of that which are you talking about on different pcs with different bios and different devices ....... ohhhh amazing ........ i think IO.sys has the responsibility for this task.

585121002[/snapback]

Well, they don't really deal with the devices directly, those 3 files. What happens is the bootloader has the operating system self-load itself into memory and from there it does what it can. To deal with the devices, device drivers have to be loaded. What's built into those files are generic drivers that will work with any x86 compliant system, and only the minimal things it needs to run at that.

  • 0

i've programmed my own little OS which only does a few commands and runs off a floppy disk.. Wasn't really all that hard to program..

I done all my programming in asm.. Started off by programming my bootstrap loader, then programmed my own kernel, then i programmed my own shell.. the shell is just a simple command line Interface. such as unix.

  • 0
i've programmed my own little OS which only does a few commands and runs off a floppy disk.. Wasn't really all that hard to program..

I done all my programming in asm.. Started off by programming my bootstrap loader, then programmed my own kernel, then i programmed my own shell.. the shell is just a simple command line Interface. such as unix.

585121096[/snapback]

that looks great , can you send me a link to your executed files of your OS ( if you don't mind )

  • 0
XP Setup doesn't have to be performed from DOS. You can boot from either the XP CD or the appropriate floppy disks and start the setup routine.

Those three files you listed are essentially DOS itself. Notice that XP (or any version of NT for that matter) do not install or require any of these three files, nor will it use them if they exist. XP will, however, execute autoexec.bat IF it exists, but it is not required to perform startup configurations.

585121028[/snapback]

i think i have found an EQUIVALENT to this 3 files which windows in a bad need to them cause i always face some troubles with them when i got a virus and correct me if i am wrong , what about HIMEM.SYS, Hiberfil.sys, NTldr and finally you need to tell me what about ((((((((((((( CONFIG.DOS, BOOTSECT.DOS ))))))))) now i guess some body will say to me THAT IS THE EMULATED DOS , in my opinion it is exactly dos files but in other name :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Salesforce to acquire Fin, formerly Intercom, for over $3 billion by David Uzondu Image via DepositPhotos.com Salesforce today announced that it has reached an agreement with customer support software company Fin to buy the company for around $3.6 billion. Salesforce expects the transaction to close in the fourth quarter of its fiscal year 2027, and the acquisition will not change its financial guidance previously announced on May 27. Marc Benioff, CEO of Salesforce, in its press release, claimed that acquiring the startup gives Salesforce an immediate AI agent that resolves support tickets across email, WhatsApp, SMS, and Slack: You might know Fin by its former name, Intercom. If you have ever been on a website or inside a mobile app and noticed a little chat bubble widget floating in the bottom right corner of your screen, often featuring a friendly face and a message like, "Hi! How can we help you today?" you were almost certainly looking at Intercom. Intercom became Fin just last month, transforming itself into an "AI-first" platform that handles customer issues with little need for humans to intervene. The new name originates from the company's highly successful AI customer service agent, which it launched way back in 2023. This digital assistant supposedly resolves about 76% of customer service volume end-to-end on its own, so the business rebranded to match its primary software tool. Fin's new owners, Salesforce, went on an acquisition spree over the last few years, and some of them you might recognize, like its 2020 $27.7 Billion acquisition of Slack. The last few months saw the enterprise giant buy several startups, including m3ter, Momentum, Cimulate, and Contentful. Salesforce said that when the Fin deal pulls through, customers will "deploy AI agents across" various service operations, which will complement Agentforce, the platform that enables businesses to deploy customizable autonomous digital workers.
    • Microsoft now allows you to tweak Visual Studio to new extremes by Usama Jawad Visual Studio 2026 recently netted a powerful feature that finally allows developers to review Git Pull Requests (PRs) directly in the integrated development environment (IDE), without needing to switch to the browser. However, that's not all that Microsoft introduced in the latest version, as it also offered a useful way to customize the IDE to their heart's content. Although Visual Studio 2026 already provides lots of stock themes based on Fluent Design principles, Microsoft understands that people still want to customize them further according to their preferences. The IDE now offers a new configuration page for themes under Tools > Options > Environment > Visual Experience > Theme colors. This allows you to set hex color codes for accent colors, hover states, and more, and apply them without requiring a restart. The Redmond tech giant further says that: Microsoft is also offering granular color tokens that allow you to customize various UX elements like the tab header without impacting the rest of the shell chrome. Your themes are also stored in JSON format in %LOCALAPPDATA%\Microsoft\VisualStudio\18.0_xxxxxxxx\ColorThemes, which basically enables you to share it with others or override existing themes. This is a major improvement in terms of the user experience powering these customization capabilities. This is because extensions were required to replace the theme, and it was not very easy to make minor adjustments. This theme configuration UX solves this problem and is available in Visual Studio 2026 version 18.7, available here.
  • Recent Achievements

    • Week One Done
      Jeroen Wilms earned a badge
      Week One Done
    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      201
    3. 3
      PsYcHoKiLLa
      127
    4. 4
      Steven P.
      82
    5. 5
      ATLien_0
      76
  • Tell a friend

    Love Neowin? Tell a friend!