|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
This might sound stupid, but how do you code an operating system? If I wanted to code my own operating system from scratch what language would I use? I don't mean an extension of Linux, I mean from scratch, a completely different os?
![]() |
| Sponsored Links |
|
|
|
|||
|
Thanks i am looking looking on the internet
|
|
|||||
|
I can tell you that Windows was made in C and C++ as was Linux. I believe Unix was made in C.
You will need to write a kernel which is the basis of an OS and controls all hardware. That should be your starting point. Also, TkTech on here has made an OS before. You may want to PM him.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
|
|||
|
My advice:
1. Decide exactly what you want. Are you interested in low level mechanism (memory management, filesystems, process control, etc) or are you interested in more higher level stuff like desktop environments and system policy. If the later then you don't want to do things from scratch and should use the Linux kernel and the subsystems it provides (like the framebuffer and ALSA) to implement your own OS. You'd be amazed at how much Linux based systems can look nothing like 'Linux'. The real benefit of this is hardware support, Linux supports stacks of hardware that you will take decades to support if you go it alone. The basic Linux kernel doesn't even have a command line though. It can be anything and everything you want (even a Windows reimplementation). 2. If you are still set on 'from scratch' development: a. Learn C, best systems programming language there is. Remember that *you* will have to implement all the higher level stuff used in other languages if you want to develop in those languages at the kernel level. Isn't worth the effort IMHO. Leave the objects for higher level stuff, computers are imperative machines based around procedures and your language should fit that. Objects do not exist at machine code level but function calls do. b. Learn ASM, you can't do a full kernel without it. 95% of your code will be C, the other 5% is platform specific ASM. c. Get used to using a tool chain like GCC(MinGW in Windows). Learn how it handles things like the C ABI and name mangling so you can easily mix code from the two languages. Get this right and then it's as simple as linking the object files together to mix ASM and C. 3. Once you've got that basic knowledge under wraps you should then look at OS development and the principles behind it. A good book on this is Tanenbaums book (OS: Design and Implementation). A good place to start might be picking up a microkernel with a liberal license and hacking away at it. Note that you can do with the kernel what you want, you don't have to implement a microkernel, we just choose one because it's the bare minimum other than a kernel from the first line of code. |
| Sponsored Links |
|
|
|
|||
|
worry less about language etc. almost any will do (you will always need a few lines of assembly). before you plunge into coding, read a book on operating systems, in particular the design of FreeBSD 5 (or similar name).
|
|
|||||
|
Yeah, I heard that Windows was coded in C++, at least XP was. I would really like to see the source code for that.
__________________
Cheap Airsoft Guns If you are looking for high-quality, yet cheap, airsoft guns, then check out MrAirsoft.com |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows XP Tricks & Tips!!!!..new ones. | pranky | Tutorials | 9 | 08-23-2008 04:22 PM |
| Internet Operating System project | iosproject | Community Projects | 6 | 12-04-2007 09:53 AM |
| Which Operating System is better ???? | Patrick | Computer Software/OS | 1 | 10-07-2007 10:50 AM |
| Project: vBulletin Alert System (vbAS) | Crane | Community Projects | 18 | 12-13-2006 11:54 AM |
| Store and Points System | Jordan | Announcements | 9 | 08-28-2006 02:38 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%