About DOS and bootsectors

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
[email protected]

About DOS and bootsectors

Post by [email protected] »

I have a question about DOS and bootsectors.
First I was reading down in the forum about using
DOS insted of writing our own kernel. How is that
possible since DOS is owned by M$? Did they make
DOS freeware now ? Ok the other question. You
know when you make a dos bootdisk. You dont have
to put the booting code in sector 0. My microkerne;
I have been learning as I build I always have to
copyboot the bootloader to sector 0 of my floppy.
How is it that in DOS you only have to copy the files
E.G. command.com autoexec.bat etc. Is there a way
to compile my program like that so I wouldnt have
to copyboot it and could just copy my kernel and bootsector?
Anyways thanks for reading. Any info is greatly appericated!
Hillbillie

RE:About DOS and bootsectors

Post by Hillbillie »

>How is that possible since DOS is owned by M$?
Did they make DOS freeware now ?

Microsoft does not own DOS, yet MS-DOS. DOS is now a public domain
name, and other companies have already made their own
version of it, such as FreeDOS, Caldera OpenDOS, etc.
Some are free, others are not. I'm not sure about any that
are open source, though.
[email protected]

RE:About DOS and bootsectors

Post by [email protected] »

Thaks for that clarification. Right now I am working
on my own kernel wrote in C. Using a pmode bootstrap
I can now load my C code and have the disk read by
a FAT12 format reader like explorer.
Guest

RE:About DOS and bootsectors

Post by Guest »

>On 2001-06-01 14:25:02, [email protected] wrote:
>Thaks for that clarification. Right now I am working
>on my own kernel wrote in C. Using a pmode bootstrap
>I can now load my C code and have the disk read by
>a FAT12 format reader like explorer.


Nice...
xby

RE:About DOS and bootsectors

Post by xby »

A 40-entry thread was posted on CLUX during
August 2000, under the title "MS-DOS Source".
It discusses the posting of the source code
of MS-DOS on the net.
Chad C.

RE:About DOS and bootsectors

Post by Chad C. »

>You
>know when you make a dos bootdisk. You dont have
>to put the booting code in sector 0. My microkerne;
>I have been learning as I build I always have to
>copyboot the bootloader to sector 0 of my floppy.
>How is it that in DOS you only have to copy the files
>E.G. command.com autoexec.bat etc.

You are useing pre-formated MS-DOS diskes. If you
look at a floppy in windows explorer you will also
notice two other files besides autoexec.bat and
command.com (io.sys and msdos.sys). These files are
allready written to sector 0 when you buy them. Thats
also why the retail box says "formated". The reason you don't
notice them in dos is because they are hidden.
Command.com is just a shell (like bash is in linux).
Guest

RE:About DOS and bootsectors

Post by Guest »

>Command.com is just a shell (like bash is in linux).

Exactly. Good idea could be to rewrite it and provide something
better. It's regular executable. I cheked...
It's normal com executable under dos (starting with E9 -
jmp instruction), in windows it's an Exe executable (starting
with 'MZ' signature), just saved as *.com.
So one could provide a better shell (like Linux bash, well...
I'm not familiar with it, just used it a bit from Cygwin tools).
mzz

RE:About

Post by mzz »

>On 2001-06-07 22:17:12, Chad C. wrote:
>>You
>>know when you make a dos bootdisk. You dont have
>>to put the booting code in sector 0. My microkerne;
>>I have been learning as I build I always have to
>>copyboot the bootloader to sector 0 of my floppy.
>>How is it that in DOS you only have to copy the files
>>E.G. command.com autoexec.bat etc.
>
>You are useing pre-formated MS-DOS diskes. If you
>look at a floppy in windows explorer you will also
>notice two other files besides autoexec.bat and
>command.com (io.sys and msdos.sys). These files are
>allready written to sector 0 when you buy them. Thats
>also why the retail box says "formated". The reason you don't
>notice them in dos is because they are hidden.
>Command.com is just a shell (like bash is in linux).

Incidently, i have never yet bought new diskette with io.sys and msdos.sys on it, probably because these files are msdos kernel (~100 kb wasted disk space for MS-DOS 6 and ~200 kb for MS-DOS 7, if you want just save files on disk) and also property of M$. The preformatted disk contains only DOS boot sector which is a little bit of code searching IO.SYS file from root directory, loading and executing first 1 kB of it if it could be found or printing "Non-system disk" if couldn't.
Guest

RE:About

Post by Guest »

>On 2001-10-14 17:32:30, mzz wrote:
>>On 2001-06-07 22:17:12, Chad C. wrote:
>>>You
>>>know when you make a dos bootdisk. You dont have
>>>to put the booting code in sector 0. My >>>How is it that in DOS you only have to copy the files
>>You are useing pre-formated MS-DOS diskes. If you
>>look at a floppy in windows explorer you will also
>>notice two other files besides autoexec.bat and
>>command.com (io.sys and msdos.sys). These files are
>>allready written to sector 0 when you buy them. Thats
>>also why the retail box says "formated". The reason you don't
Ouch, I was posting first time to this forum and
thought that text will be wrapped. So i send it
now again with line breaks included...

Incidently, i have never yet bought new
diskette with io.sys and msdos.sys on it,
probably because these files are msdos kernel
(~100 kb wasted disk space for MS-DOS 6 and
~200 kb for MS-DOS 7, if you want just save files
on disk) and also property of M$. The
preformatted disk contains only DOS boot sector
which is a little bit of code searching IO.SYS
file from root directory, loading and executing
first 1 kB of it if it could be found or
printing "Non-system disk" if couldn't.
Post Reply