• 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

    • BleachBit 6.0.1 Beta by Razvan Serea When your computer is getting full, BleachBit quickly frees disk space. When your information is only your business, BleachBit guards your privacy. With BleachBit you can free cache, delete cookies, clear Internet history, shred temporary files, delete logs, and discard junk you didn't know was there. Designed for Linux and Windows systems, it wipes clean thousands of applications including Firefox, Microsoft Edge, Google Chrome, Opera, Safari, and more. Beyond simply deleting files, BleachBit includes advanced features such as shredding files to prevent recovery, wiping free disk space to hide traces of files deleted by other applications, and vacuuming Firefox to make it faster. Better than free, BleachBit is open source. BleachBit has many useful features: Delete your private files so completely that "even God can't read them" according to South Carolina Representative Trey Gowdy. Simple operation: read the descriptions, check the boxes you want, click preview, and click delete. Multi-platform: Linux and Windows Free of charge and no money trail Free to share, learn, and modify (open source) No adware, spyware, malware, browser toolbars, or "value-added software" Translated to 64 languages besides American English Shred files to hide their contents and prevent data recovery Shred any file (such as a spreadsheet on your desktop) Overwrite free disk space to hide previously deleted files Portable app for Windows: run without installation Command line interface for scripting and automation CleanerML allows anyone to write a new cleaner using XML Automatically import and update winapp2.ini cleaner files (a separate download) giving Windows users access to 2500+ additional cleaners Frequent software updates with new features Going beyond standard deletion of files, BleachBit has several advanced cleaners: Clear the memory and swap on Linux Delete broken shortcuts on Linux Delete the Firefox URL history without deleting the whole file—with optional shredding Delete Linux localizations: delete languages you don't use. More powerful than localepurge and available on more Linux distributions. Clean APT for Debian, Ubuntu, Kubuntu, Xubuntu, and Linux Mint Find widely-scattered junk such as Thumbs.db and .DS_Store files. Execute yum clean for CentOS, Fedora, and Red Hat to remove cached package data Delete Windows registry keys—often where MRU (most recently used) lists are stored Delete the OpenOffice.org recent documents list without deleting the whole Common.xcu file Overwrite free disk space to hide previously files Vacuum Firefox, Google Chrome, Liferea, Thunderbird, and Yum databases: shrink files without removing data to save space and improve speed Surgically remove private information from .ini and JSON configuration files and SQLite3 databases without deleting the whole file Overwrite data in SQLite3 before deleting it to prevent recovery (optional) BleachBit 6.0.1 Beta release notes: BleachBit 6.0.1 beta is now available for testing. This maintenance-focused release includes bug fixes, updated translations, and a range of safe enhancements. This release fixes a Windows security issue that could allow arbitrary file deletion during privileged cleaning (reported by Zeze with TeamT5). It also adds new cleaners (including a DNS cache cleaner, Claude Code, and Visual Studio Code forks), support for multiple Chrome and Edge profiles, new deep scan options for developer directories like node_modules and venv, and safer, faster file shredding. All Platforms Added cleaners for Claude Code, DNS cache, and many Visual Studio Code forks. Added support for multiple Chrome and Edge profiles. Chrome can now clean downloaded AI models. Deep Scan can optionally remove venv, __pycache__, node_modules, and .angular directories. Deep Scan is faster by skipping directories on the keep list. File shredding is safer, faster, and leaves fewer recoverable traces. Improved handling of cookies, symlinks, Unicode filenames, external processes, and configuration files. Improved Expert Mode warnings and long warning dialogs. Fixed crashes related to cleaner detection, invalid Unicode, and malformed cleaner data. Clipboard is now cleared automatically after shredding files via paste operations. Linux Added AppImage support. Added cleaners for Visual Studio Code, Codeium, Librewolf (.deb), Transmission (Flatpak), and Profanity. Improved Linux trash detection, including Snap-installed applications and mounted drives. Fixed Wayland root CLI issues and several Snap-related problems. Improved package dependencies, AppStream metadata, and desktop file handling. Fixed startup crashes when Python Requests is unavailable. Windows Fixed a security vulnerability that could allow arbitrary file deletion when cleaning with elevated privileges. Added %WindowsSystem% variable support. Improved clipboard clearing using native Windows APIs. Improved installer experience on unsupported Windows versions. Reduced installer size and improved application robustness. Fixed Unicode handling, filename anonymization, Git revision reporting, and splash screen stability. [full release notes] Download: BleachBit 6.0 | Portable | ~20.0 MB (Open Source) View: BleachBit Home page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • DriversCloud 12.1.6 by Razvan Serea With DriversCloud (formerly My-Config.com), you can explore your computer easily, safely and free. The application quickly scans your PC and identifies the hardware and software components. DriversCloud then establishes a list of the different drivers compatible with your OS and hardware. Download the drivers needed for the proper functioning of your computer. To detect your drivers, DriversCloud also displays a detailed summary of your hardware and software configuration, analyzes your BSOD, monitors in real-time your PC voltages and temperatures and lets you share your configuration online. Once the hardware components have been detected, you will be able to obtain with just a few clicks the latest drivers corresponding to the identified hardware. You can record your configuration on the site for free, and can get the corresponding URL to post the configuration to technical forums, e-mail and social networks. You can also download the detection result (the configuration) as a PDF file. To protect the user's privacy and data confidentiality, a 4-level confidentiality system was created that filters the XML marks and gives control to the user. The default level can be modified in the preferences. Using the maximum level will prevent the user from publishing his configuration and generating a corresponding PDF file. In non-connected mode, each XML configuration is stored on the server for one day (for practical reasons). However, you are given the opportunity to manually delete it. Created in 2004, and continually improved, My-Config.com has established itself on the web as a free service to PC users running Windows and Linux operating systems. The service is designed to work with the most common Internet browsers (Edge, Firefox, Chrome, Safari). Download: DriversCloud 64-bit | 20.0 MB (Freeware) Download: DriversCloud 32-bit | 18.9 MB Link: DriversCloud Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
    • Week One Done
      agatameier earned a badge
      Week One Done
    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
  • Popular Contributors

    1. 1
      +primortal
      516
    2. 2
      +Edouard
      193
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      96
    5. 5
      Steven P.
      77
  • Tell a friend

    Love Neowin? Tell a friend!