• 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

    • Linux 7.1 arrives with an NTFS overhaul and major hardware performance boosts by Paul Hill The founder of the Linux kernel has just announced the availability of Linux 7.1. This is a stable version of the kernel that will now be tested by various Linux distributions before it is shipped to users through update managers. Some users, like those on Debian, for example, might not get it for a long time, if at all, while Fedora users can expect it in the near future. With Linux 7.1 out on time, the merge window for Linux 7.2 is now open, giving contributors the opportunity to send in major new features that have been waiting for the last two months. Torvalds warned that he is currently travelling and will be in another timezone, so timing for the merge window may be irregular due to timezone differences and limited internet access. Torvalds said that he has already fetched early pull requests to allow him to do some offline work, but the travel could still cause disruption. Right now, he is not planning to extend the release, but did consider it. He said he might later regret not extending, though. In terms of this last week of development for Linux 7.1, Torvalds said there were no major or alarming changes. This week consisted mostly of smaller driver updates to GPU, networking, and sound, networking fixes, trace tooling fixes, and misc minor fixes. The shortlog this week lists fixes for driver bugs, memory leaks, I/O and USB fixes, networking and RDMA fixes, DRM/graphics fixes, and tooling and verification improvements. Specific fixes include USB series heap-overflow and buffer overflow fixes, and multiple use-after-free, memory-leak, and refcount corrections across subsystems such as i2c, zram, gpio, and net. There are fixes for graphics drivers, including amdgpu, i915, and virtio, as well as hypervisor and virtualization tweaks affecting mshv, vmbus, and hyperv. According to Phoronix, anyone running Linux 7.1 should look out for the new NTFS driver, Intel FRED for improved performance on Panther Lake and future CPUs, faster graphics with Intel Arc Battlemage, and improvements for older AMD Radeon GPUs. If you are running Linux on your computer and everything is fine, then you don’t need to worry about updating to Linux 7.1 as a priority; just wait for it to be pushed to you. If you have tried Linux on hardware but it didn’t work properly, trying again with a distro that uses Linux 7.1 could cause Linux to work on your machine, thanks to the new hardware support.
    • you can also do this with this tool: PowerSettingsExplorer made by mbk1969 at 3dguru forum.. I found it by accident researching on modern standby and annoying quirks of it in 2022
    • AB Download Manager 1.9.1 by Razvan Serea AB Download Manager is an open-source, feature-rich download manager designed to accelerate downloads, organize files efficiently, and provide seamless control over downloads. With support for multiple connections, resume capability, and an intuitive interface, it enhances the downloading experience for users seeking speed and reliability. The software integrates with various browsers, enabling quick link grabbing and batch downloading. It supports HTTP, HTTPS, and FTP protocols, ensuring broad compatibility with different file sources. Users can schedule downloads, set speed limits, and categorize files automatically for better organization. AB Download Manager is lightweight yet powerful, making it a great alternative to proprietary download managers. Its open-source nature allows developers to contribute, customize, and improve the software as needed. Whether you're downloading large files, managing multiple downloads at once, or seeking an ad-free experience, this tool offers a practical and efficient solution. Key features of AB Download Manager: Multi-Connection Support – Accelerates downloads by splitting files into multiple segments. Resume Capability – Allows paused or interrupted downloads to be resumed without starting over. Batch Downloading – Supports downloading multiple files at once for improved efficiency. Browser Integration – Captures download links directly from browsers for seamless operation. HTTP, HTTPS, and FTP Support – Ensures compatibility with a wide range of file sources. Download Scheduling – Enables users to automate downloads at specific times. Speed Limiting – Lets users control bandwidth usage for optimized performance. File Categorization – Automatically organizes downloaded files into designated folders. User-Friendly Interface – Simple and intuitive design for easy navigation. Cross-Platform Compatibility – Works on multiple operating systems. Ad-Free Experience – No intrusive ads or tracking for a clean user experience. AB Download Manager 1.9.1 changelog: Added An option to customize notification sounds (#1259) Fixed Ongoing notification was laggy on Samsung One UI devices (#1269) Improved Updated Translations Minor UI/UX improvements Download: AB Download Manager 1.9.1 | Portable | ~80.0 MB (Open Source) Download: ARM64 | Portable ARM64 | Android Links: AB Download Manager Website | Github Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • watching him because of the Mr Klinton cat
    • yup dude, ADS on this website are terrible
  • Recent Achievements

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

    1. 1
      +primortal
      506
    2. 2
      +Edouard
      196
    3. 3
      PsYcHoKiLLa
      140
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!