Teen Programmers Unite  


Return to forum top

Writing a DOS based OS? Not like the other post

Posted by Brok3n_Link [send private reply] at July 15, 2002, 08:11:50 AM

hi all, I'm interested in writingg my own OS, but I don't really want to mess around with boot Processes and Drivers. I'm thinking, making a DOS based OS (a bit like
w!ndows) or an extension on to DOS (see, I like DOS, but not windows.)
anything appreciated, thanks people.

Brok3n Link

Posted by metamorphic [send private reply] at July 15, 2002, 09:41:33 AM

if you want to make your own OS, you will have to mess around with boot processes and you will need to create a kernel, which handles all the hardware. A kernel will actaully need drivers to get the hardware to work. What i would suggest to make a 'DOS - like OS' is to actually install DOS on your machine. Then, edit one of the config files (cant rememer which one) and change where the shell variable points to. Change that to a new shell that you write. That way you wont have to worry about partitions, filesystems, input/output, communication ect. A shell is just really an infinate loop.

   // get input
   // act on input
while($command != "exit")
Posted by unknown_lamer [send private reply] at July 15, 2002, 11:14:09 AM

If you want to base it on dos, then Freedos is a good place to start (http://www.freedos.org). It's a GPLed DOS implementation that has at least one nice GUI for it (SEAL). FreeDOS is still a 16-bit real mode system that lacks protected memory...there is a series of articles in the linux gazette http://www.linuxgazette.com/issue77/krishnakumar.html on how to write your own Toy OS (this is just part I...part II hasn't been posted yet). You could also take a look at menuet OS (http://www.menuetos.org) for an OS coded entirely in 32-bit assembly (with experimental support for ELF binaries so [in theory at least] you may eventually be able to run FreeBSD and GNU/Linux programs on it).

Posted by Brok3n_Link [send private reply] at July 16, 2002, 10:20:27 PM

saweet thanx all

metamorphic: do you mean to have DOS installed, and to overwrite the DOS command prompt with a custom shell?
not quite getting your meaning. I think you mean that change the win.ini to a different file(explorer.exe to customshell.exe) but that's windows....????

BTW: cool stuff Unknown

thanks again

brok3n Link

Posted by metamorphic [send private reply] at July 17, 2002, 04:10:00 AM

yeah thats what i ment, i think you can also shange the shell in dos. not sure though. have a look round the dos config files.

Posted by unknown_lamer [send private reply] at July 17, 2002, 11:21:27 AM

I do believe (from my old days of DOS) that you can just put something other than command.com in your autoexec.bat and run that as your shell (e.g. the old DOS 5 semi-graphical dosshell ). I think you did something like this at the end of the autoexec:


or does command not have exit, I can't remember. I think there is another config file that you can use to change your shell.

Posted by sphinX [send private reply] at July 17, 2002, 05:36:36 PM

There's also an environment variable one can set ... COMSPEC I believe, or perhaps even just SHELL. I can't remember these things.

Posted by vladimir_l [send private reply] at July 21, 2002, 01:21:40 PM

Some of them are craap , mind those. TRy Rush , I had time to try that one.

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.