• 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.

585120935[/snapback]

WineME does run on a DOS bootstrap. It is not like NT.

  • 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]

I'm 100% sure there is NO DOS needed to run XP. io.sys, config.sys, autoexec.bat... not needed by XP.

  • 0
Well, there's going to be at least some part of a system that will be in assembly.

585138228[/snapback]

Yeah, I just remembered, some parts of a complex OS has to be written in assembly but in general, simple OS can be written in high level languages.

  • 0

The kids trying to learn and make an OS to be as he chooses, let him. Ive seen alot of "You cant, Give up, You wont, This and that". There IS no I CANT, HE CANT, THEY CANT. If this were all true, then we wouldnt be here at this very moment. Computers dont grow out of trees, and OS'es dont grow in a flower. A person just like that sat down and thought about it and analyzed. Sure, the chances are fairly slim, and it will take years, but you never know. Maybe in the near future we'll see a full blown OS come out that many of us will like and switch over to. Im not one to hate XP, or Microsoft for that matter, but something new wouldnt be bad.

Overall, and in the end, good luck mate. Be patient and take your time, if it doesnt end up being successful, atleast you have the experience and knowledge that you probably dont have at the moment. I myself would like to have more knowledge in this, and the links given have been great. I shall also sit down over my spare tiems and read all of this. It might come in handy some day. :yes:

  • 0

good point kayman, @elagizy if you want to make an os styled on that program, you do know the .net languages require the clr to run dont you? there is mono for linux but then again the support for windows.forms requires to be on windows or running wine in linux. If youd really like to have that as the main interface in an os id highly suggest, as others have you simply make a shell replacement, like bb4win etc ;)

@ davemania24 --- http://www.menuetos.org/ on the first page of this thread, an os written completely in assembly, very cool little thing

  • 0

thanks all for your point of view about the program and about the hell which i'm going to face it in doing my OS ...

and i have download the source code of the kernel and application of www.menuetos.org OS ( special thanks for the posting, its pretty cool ), if you see the screen shots it seems that the programmer made a graphical interface for the OS ( as i want to ) also i can see he made also something in his OS which can play the famous game Prince Of Persia (Dos Version)

and thats the features :

- Pre-emptive multitasking, multithreading, ring-3 protection

- Responsive GUI with resolutions up to 1280x1024, 16 million colours

- IDE: Editor/Macro Assembler for building kernel and applications

- TCP/IP stack with Loopback, PPP & Ethernet drivers

- Network applications include ftp/http/mp3/smtp servers,

- irc, http, nntp and tftp clients

- Free-form, skinnable application windows

- Hard real-time data fetch

- Fits uncompressed on a single floppy!

i think now that will be a good source which help me the essentials ....

and i am going to ask u few question as a beginning to go through hell :

- i want to know the period which takes in doing that OS ? ( you may give a range )

- what is the best tool which i use to write assembly and C ? ( if there is , Giving links to download the tools will be great )

- Is Virtual PC is the best tool to test my OS faster ?

- and finally what is the 1st step ( File ) which i will program it first ? ( discss only the main idea (task)file and i will going to conclude it through the files of menue OS )

  • 0

- Writing your own OS from scratch takes a while... there's a class at my university where that's done in a semester.

- You can pick whatever you want as your editor... I like vim. You can use gcc and co. to build the source into a kernel.

- Virtual PC is probably the best option if you have it. Otherwise, you're stuck with something like bochs.

- I don't know what you're asking...?

  • 0
i think now that will be a good source which help me the essentials ....

and i am going to ask u few question as a beginning to go through hell :

- i want to know the period which takes in doing that OS ? ( you may give a range )

- what is the best tool which i use to write assembly and C ? ( if there is , Giving links to download the tools will be great )

- Is Virtual PC is the best tool to test my OS faster ?

- and finally what is the 1st step ( File ) which i will program it first ? ( discss only the main idea (task)file and i will going to conclude it through the files of menue OS )

585139243[/snapback]

1) Depends on how many features you have, how many people you have working on it, etc... If you start from scratch maybe 5-6 years? If you use the example OS and built from it.. maybe sooner? Its hard to guess since I am finding it hard to judge your level of computer knowledge.

2) I use a plain notepad or text editor program for assembly and Visual Studio.Net for C. There is the KDevelop clone of Visual Studio for free (it is open source).

3) Yes, VirtualPC or VMWare is the best way to test your OS unless you have a second computer which you can use. I would prefer to use a real machine, but you may not have that. Although, with the virtual machine you have a lot more debug options available.

4) You first need to write a boot sector and master boot record to start your OS. Then you need to develop a kernel to provide basic features such as mulit-tasking, device support, etc. The last thing you will do is create your user interface and functionality.

  • 0
Uhhh, I've never seen an OS hand coded in assembly unless it was in a embedded system

585138223[/snapback]

Umm, what do you think the low level stuff is? C++? JAVA?!? Of course all OS'es have parts in assembly. :rofl:

  • 0
BTW , is there any harm to my computer devices while programming OS ( when making drivers for the devices ...... etc ) ?

May I make a suggestion? Find a super-cheap computer, maybe even one somebody's throwing away, and thrash it. Use the free compilers that come with Linux ( I already gave the link last time.), write any program you wish, and run it on that cheap PC. Call it your "crash test dummy". When you have reduced it to a heap of smoking ruin, replace whatever hardware you trashed. Get acquainted with your screwdriver...make it your best friend. When you have fixed the computer, trash it again, and so on.

What will this do? You will learn right away what to do and not do with device drivers (I hope you can find a lot of cheap monitors!), and you will become familiar with more different kinds of hardware. To make your operating system any good to other people, you'll need it to be able to run on somebody else's computer besides your own, right? So get your hands on as much old hardware as you can! Later, you can buy the better hardware to test it on, and announce that you've "ported" your OS to the newest hardware. In the meantime, all the 286's out there still WORK...

Others here have suggested Visual Studio applications, and yes, they have their merits. But you're asking where can I find compilers/development environments free...Linux Red Hat comes with (I'm guessing) eight compilers, and/or development envoironments? There's gcc, yabcc, g++ just for C, there's emacs for the ultimate text-based code environment, where there's no bossy GUI getting in your face and fouling up the Chi of your programming space, there's at least half a dozen interpreters and compilers for other languages ranging from Ada to assembler. I never scanned a line of Perl code, and just reading the tutorial that came with my distro for free, I now could at least grope my way through Perl if I had to.

You see, you're proposing to write an entire OPERATING SYSTEM! So, you'll need to be really, really knowledgable about EVERYTHING a computer does. Even about the applications and processes that you don't use. Other people may use or want them, and so your operating system will need them.

I don't mean to be so pushy about Linux (I'm turning into a Linux missionary, I sometimes feel) but Linus Torvalds started out just like you, and he's the best example I can recommend. Also, in the Linux world, there are so many different flavors and variations of Linux, and some of them are very small (try getting ahold of "Damn Small Linux" or "Linux friom Scratch" ), and you might be better off starting with your system by "thinking small". Start with the basics: what do you want a computer to do? Then build from there.

And, if nothing else, thank you for starting this thread. I have found it most stimulating, and it has produced a much livelier discussion than the usual questions. And count me in with the people cheering you on! You can do it, if you set your mind to it! But you will have much to learn. And why not do it, anyway? Why not? You only have a lifetime, and many people live and die in this world without even writing any programs at all...

  • 0
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

585120974[/snapback]

Smartdrv.exe is a disk-caching program for DOS, it speeds up disk I/O. Winxp setup in DOS mode will use it if its available, and complain if its not there telling you that its going to take a long time to copy files without it. Thats all.

Edited by Richardo
  • 0

Yes you can damage your computer, that's why choose the Virtual PC, if you have it, the worst it can happen it's that the VPC crashes, the hardest part will be the drivers communication, and the bootloader, then after this, all extra-features will be easier to deploy.. :cool:

  • 0
Yes you can damage your computer, that's why choose the Virtual PC, if you have it, the worst it can happen it's that the VPC crashes, the hardest part will be the drivers communication, and the bootloader, then after this, all extra-features will be easier to deploy.. :cool:

585533858[/snapback]

I would probably be better, from a compatibility stan-point, to just find an el-cheapo computer and test it on that. That way you have actual hardware running you OS, not emulation hardware.

  • 0
I don't mean to be so pushy about Linux (I'm turning into a Linux missionary, I sometimes feel) but Linus Torvalds started out just like you, and he's the best example I can recommend. Also, in the Linux world, there are so many different flavors and variations of Linux, and some of them are very small (try getting ahold of  "Damn Small Linux" or "Linux friom Scratch" ), and you might be better off starting with your system by "thinking small". Start with the basics: what do you want a computer to do? Then build from there.

585162399[/snapback]

Except... Linus did NOT write an OS... Linus wrote a kernel. The OS now known as Linux was built over a period of several years by dozens of people under GNU.

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

    • No registered users viewing this page.
  • Posts

    • I think he means you haven't reviewed previous UFC games. Of course it doesn't matter... Every time you just report on something that involves the President even if just simply what happened you guys usually get accused of being anti-Trump. We live in fun times.
    • So how did you solve the problem? Disabling Secure Boot isn’t a solution.
    • Another devilish issue surrounding these certificates is what can happen with old, unsuspecting PCs that nevertheless have Secure Boot enabled. In my case, it was a Dell with a 3rd-gen Core chip (so about 13 years old). As of the last few weeks, it was suddenly BSOD'g within about 5 minutes of booting. Turns out it was because of MS's "Secure-Boot-Update" scheduled task, which is scheduled to run 5 minutes after login. It's explained in gory detail here (this is not my post, but it was where I found the answer), but the short version is that this legacy system would need fairly elaborate, manual certificate intervention since MS's automatic cert update method cannot work. How to do that is linked late in the thread. https://www.bleepingcomputer.c...od-caused-by-scheduled-task Secure Boot wasn't at all important for this particular PC, so I disabled it to be done with the problem.
    • Winhance 26.06.12 by Razvan Serea Winhance is an open-source Windows enhancement utility designed to help users debloat, optimize, and customize Windows 10 and 11. It provides a user-friendly interface for removing unwanted apps, legacy components, and optional features safely, giving you more control over your system. With Winhance, you can improve performance, reduce clutter, and enhance privacy without the need for a clean install. Beyond basic debloating, Winhance offers extensive optimization tools. Users can tweak power plans, adjust gaming and performance settings, control notifications, and manage Windows Update behavior. Privacy-focused settings allow you to limit telemetry and data collection, while system customization options let you personalize the taskbar, Start menu, Explorer, and Windows themes. Winhance also supports installing or removing software efficiently, including external apps via WinGet integration, streamlining both new setups and daily maintenance. New AI privacy groups have been added for Windows AI, Microsoft Edge AI, and Microsoft Office AI, giving users clearer control over AI-related telemetry and feature usage. In addition, new settings in Gaming & Performance introduce AI taskbar pin toggles, options to remove AI apps, and controls for AI services and scheduled tasks, allowing users to better manage how AI components run in the background and appear in the system. For advanced users and IT professionals, Winhance integrates WIMUtil, a tool for creating custom Windows installation ISOs with automated configuration. You can generate autounattend.xml files, inject drivers, and apply your chosen Winhance settings automatically during installation. Most changes are non-destructive and reversible, with clear explanations in the GUI. Whether you’re optimizing a single PC or managing multiple systems, Winhance delivers a faster, cleaner, and highly personalized Windows experience. The Winhance.Installer.exe includes both Installable and Portable versions during setup. Winhance supports both Windows 10 and Windows 11 64-bit versions. It's regularly updated to ensure compatibility with the latest Windows updates and features. Winhance key features: Debloat Windows – Safely remove unwanted apps, features, and legacy components. Optimize Performance – Tune system settings for speed, responsiveness, and gaming. Privacy Enhancements – Control telemetry, data collection, and notifications. Power Management – Configure power plans and advanced energy settings. Windows Update Control – Adjust update behavior for stability and convenience. Theme Customization – Switch between light/dark mode and adjust system colors. Taskbar & Start Menu Tweaks – Modify layout, icons, and behavior. Explorer Customization – Adjust file explorer appearance and functionality. Software Management – Install/remove Windows apps and optional features. External Apps Installation – Deploy essential apps via WinGet integration. Configuration Management – Save, export, and import Winhance settings easily. Automation with WIMUtil – Create custom Windows ISOs with integrated settings. Autounattend.xml Generator – Automate Windows installations with preconfigured options. Driver Integration – Include current system drivers in custom ISOs. Non-Destructive Changes – Reversible settings with clear explanations in the GUI. Winhance 26.06.12 changelog: Features Builder Mode — build a Winhance config file or autounattend.xml without changing anything on the PC you're sitting at. Flip the new mode switcher to Builder, set everything the way you want it, and save the result as a Winhance config or an autounattend file ready for deployment on other machines. Sponsors & Supporters page — the exit donation dialog is gone. In its place, an in-app page (heart icon or the More menu) recognizes the businesses and individual supporters who keep Winhance free. It works offline and is fully localized. Change History — Winhance now keeps a receipt of everything it does. ChangeHistory.txt records every setting change (before and after values) and every app install or removal, with clear headers for config imports and bulk actions. Open it from the More menu. Hebrew language support — Winhance is now available in 29 languages. New Explorer customizations: desktop icon visibility toggles, This PC folder visibility, an icon cache size setting, and automatic thumbnail cache cleanup. New "All apps view" setting for the redesigned Windows 11 Start menu, and the Windows 11 system tray icons setting is now a dropdown with more control. App-local UI zoom — press Ctrl +/-/0 or use Ctrl+MouseWheel to scale the whole app, just like a browser. New External Apps: EA app, Ubisoft Connect, Battle.net, Rockstar Games Launcher, PowerShell, and Helium Browser. Bug Fixes Layouts no longer clip when the Windows text size slider is set above 100%. Accessibility: Narrator now announces setting names on toggles and dropdowns, previously unlabeled buttons are labeled, and progress updates are announced. Silent updates now respect your custom install location instead of reverting to the default. Cancel in Review Mode no longer clears your app selections. OneNote is now detected correctly for Win32 Click-to-Run installs. Clean Start Menu applies more reliably by also writing the group policy path. WinGet errors are no longer silent — error details now show in the terminal output. Fixed a startup crash on older Windows builds caused by a .NET runtime regression. Config import now converts power setting values correctly and no longer re-applies an already-active power plan. Improvements App icons load noticeably faster and cover almost everything now, including legacy capabilities and optional features — they come from a dedicated, checksum-validated icon repository and are fetched in parallel. Software & Apps polish: per-icon tooltips, extra table columns, an app sort dropdown, relocated search, and a cleaner compact view. A warning now appears when the Connected Devices Platform Service is set to Manual or Disabled, since some Windows features depend on it. Download: Winhance 26.06.12 | 61.5 MB (Open Source) Links: Winhance Website | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • 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
    • One Month Later
      agatameier earned a badge
      One Month Later
    • Week One Done
      agatameier earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      95
    5. 5
      Steven P.
      77
  • Tell a friend

    Love Neowin? Tell a friend!