• 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

    • Dopamine 3.0.6 by Razvan Serea Dopamine is an awesome free audio player which tries to make organizing and listening to music as simple and pretty as possible. Dopamine has been designed for Windows 7, Windows 8.x and Windows 10 and plays mp3, ogg vorbis, flac, wma and m4a/aac music formats quite well. The best part? It's created by long-time Neowin member, Raphaël Godart. If you’re looking for a music player to handle a large music collection, you should definitely give Dopamine a try. Dopamine 3.0.6 changelog: Fixed Manually edited album covers are overwritten on the next collection refresh Fixed AppImage package not working on modern GNU/Linux distributions Deleting song from playlist sometimes fails Playback controls only work when clicking on upper half of the buttons It's unclear that files must be tagged with an external ReplayGain scanner (for example rsgain) before normalization can take effect. Change to Artist or Album tags is not reflected in the song list view nor in the Now Playing information ReplayGain issues Smart playlist filters ignore text containing accents or other special characters Some MP3 files trigger an "MPEG header not found" error due to a too-narrow initial MPEG header scan range Changed Updated the Vietnamese translation Download: Dopamine 3.0.6 | 122.0 MB (Open Source) Links: Home Page | Forum Discussion | Screenshot | Other OSes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • 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!