VOGONS


First post, by eesz34

User metadata
Rank Member
Rank
Member

I thought this would be an easy one to Google, but no. How does DOS know how many floppy drives are in the system?

Even better, any recommendations on where I can read about this, and the boot process starting from POST and into DOS?

Reply 1 of 12, by Jo22

User metadata
Rank l33t++
Rank
l33t++

BIOS Vector Table?

https://matrix.home.xs4all.nl/system/ivt.html

Otherwise, some OSes like PC-MOS/386 simply do assume that there's a floppy controller/drive in the system.

Many BIOSes provide floppy drive B: as a phantom floppy, also.
An alias to drive A:, so to say, if only A: is physically installed.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 3 of 12, by mkarcher

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2022-10-12, 12:34:

Many BIOSes provide floppy drive B: as a phantom floppy, also.
An alias to drive A:, so to say, if only A: is physically installed.

On PC-compatible systems, the phantom drive "B:" is not provided by the BIOS, but by DOS. The intention of the phantom drive is that you can copy files from one floppy to a different floppy using "copy a:file.txt b:". DOS keeps record of whether the drive was accessed last using the letter "A:" or "B:", and when you access the other letter, DOS outputs the message "Please insert disk in drive X: and press enter to continue".

The easiest way to determine the number of floppy drives on AT-compatible computers is calling INT 13, AH=08. If a drive is present, you will get the type, if the drive is missing, you get the carry flag set. AH=08 is supported for hard drives since the XT (by the hard drive controller BIOS), but floppy drive support for AH=08 only appeared with the AT (in the mainboard BIOS). Another common way to determine the number of floppy drive (starting at the AT) is just checking the CMOS byte containing the drive types. The only PC compatible method is INT11, though, so I expect DOS to call INT11.

Reply 4 of 12, by eesz34

User metadata
Rank Member
Rank
Member
mkarcher wrote on 2022-10-12, 17:07:

On PC-compatible systems, the phantom drive "B:" is not provided by the BIOS, but by DOS. The intention of the phantom drive is that you can copy files from one floppy to a different floppy using "copy a:file.txt b:". DOS keeps record of whether the drive was accessed last using the letter "A:" or "B:", and when you access the other letter, DOS outputs the message "Please insert disk in drive X: and press enter to continue".

The easiest way to determine the number of floppy drives on AT-compatible computers is calling INT 13, AH=08. If a drive is present, you will get the type, if the drive is missing, you get the carry flag set. AH=08 is supported for hard drives since the XT (by the hard drive controller BIOS), but floppy drive support for AH=08 only appeared with the AT (in the mainboard BIOS). Another common way to determine the number of floppy drive (starting at the AT) is just checking the CMOS byte containing the drive types. The only PC compatible method is INT11, though, so I expect DOS to call INT11.

So how is the port address communicated? Or would DOS assume 0x3F0 and not use a secondary at 370? I'm pretty new at these level of details.

Reply 5 of 12, by FrankieKat

User metadata
Rank Newbie
Rank
Newbie
eesz34 wrote on 2022-10-12, 12:14:

Even better, any recommendations on where I can read about this, and the boot process starting from POST and into DOS?

This article does a very good job describing the boot process of an XT-class machine (though many of these are still applicable in later PCs and BIOSes too).

http://philipstorr.id.au/pcbook/book1/post.htm

Also, depending on your level of comfort with assembly language, the IBM Technical references have full source code listing. Also, there are several open-source BIOS projects (GLaBIOS, Super PC/Turbo XT BIOS) out there that you can read to see how things work too.

FK

Reply 6 of 12, by Jo22

User metadata
Rank l33t++
Rank
l33t++
mkarcher wrote on 2022-10-12, 17:07:
Jo22 wrote on 2022-10-12, 12:34:

Many BIOSes provide floppy drive B: as a phantom floppy, also.
An alias to drive A:, so to say, if only A: is physically installed.

On PC-compatible systems, the phantom drive "B:" is not provided by the BIOS, but by DOS. The intention of the phantom drive is that you can copy files from one floppy to a different floppy using "copy a:file.txt b:". DOS keeps record of whether the drive was accessed last using the letter "A:" or "B:", and when you access the other letter, DOS outputs the message "Please insert disk in drive X: and press enter to continue".

The easiest way to determine the number of floppy drives on AT-compatible computers is calling INT 13, AH=08. If a drive is present, you will get the type, if the drive is missing, you get the carry flag set. AH=08 is supported for hard drives since the XT (by the hard drive controller BIOS), but floppy drive support for AH=08 only appeared with the AT (in the mainboard BIOS). Another common way to determine the number of floppy drive (starting at the AT) is just checking the CMOS byte containing the drive types. The only PC compatible method is INT11, though, so I expect DOS to call INT11.

Thank you, I now remember again!
I did read about these things in the PC-DOS 3.30 manual, I think.
But that was way back in the 90s, early 2000s. 😅

FrankieKat wrote on 2022-10-12, 17:26:
This article does a very good job describing the boot process of an XT-class machine (though many of these are still applicable […]
Show full quote
eesz34 wrote on 2022-10-12, 12:14:

Even better, any recommendations on where I can read about this, and the boot process starting from POST and into DOS?

This article does a very good job describing the boot process of an XT-class machine (though many of these are still applicable in later PCs and BIOSes too).

http://philipstorr.id.au/pcbook/book1/post.htm

Also, depending on your level of comfort with assembly language, the IBM Technical references have full source code listing. Also, there are several open-source BIOS projects (GLaBIOS, Super PC/Turbo XT BIOS) out there that you can read to see how things work too.

FK

Wait, "GLaBIOS"? 😂 That's a reference to GLaDOS, right? The AI from Portal?

Boy, that's funny. Also like the colours! 😃
Perfectly matches XDOS 5 or 4DOS, color wise!

In combination with this utility (synhili), things would be perfect. 💜
https://bisqwit.iki.fi/source/synhili.html

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 7 of 12, by FrankieKat

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2022-10-12, 17:50:
Wait, "GLaBIOS"? 😂 That's a reference to GLaDOS, right? The AI from Portal? […]
Show full quote
FrankieKat wrote on 2022-10-12, 17:26:

Also, depending on your level of comfort with assembly language, the IBM Technical references have full source code listing. Also, there are several open-source BIOS projects (GLaBIOS, Super PC/Turbo XT BIOS) out there that you can read to see how things work too.

Wait, "GLaBIOS"? 😂 That's a reference to GLaDOS, right? The AI from Portal?

Boy, that's funny. Also like the colours! 😃
Perfectly matches XDOS 5 or 4DOS, color wise!

In combination with this utility (synhili), things would be perfect. 💜
https://bisqwit.iki.fi/source/synhili.html

Makes total sense really. I mean, if you've got GLaDOS, you're going to need a BIOS right? 😀

Reply 8 of 12, by eesz34

User metadata
Rank Member
Rank
Member
FrankieKat wrote on 2022-10-12, 17:26:
This article does a very good job describing the boot process of an XT-class machine (though many of these are still applicable […]
Show full quote
eesz34 wrote on 2022-10-12, 12:14:

Even better, any recommendations on where I can read about this, and the boot process starting from POST and into DOS?

This article does a very good job describing the boot process of an XT-class machine (though many of these are still applicable in later PCs and BIOSes too).

http://philipstorr.id.au/pcbook/book1/post.htm

Also, depending on your level of comfort with assembly language, the IBM Technical references have full source code listing. Also, there are several open-source BIOS projects (GLaBIOS, Super PC/Turbo XT BIOS) out there that you can read to see how things work too.

FK

Those look like a worthwhile read.

I'm familiar with assembly, but not x86 assembly yet. I get the impression it's convoluted compared with others (my first assembly program ever was for 6502).

Reply 9 of 12, by Jo22

User metadata
Rank l33t++
Rank
l33t++
eesz34 wrote on 2022-10-12, 18:10:

I'm familiar with assembly, but not x86 assembly yet. I get the impression it's convoluted compared with others (my first assembly program ever was for 6502).

Yeah, the Intel nomenclature isn't exactly the best.
Both Zilog (Z80; an 8080 alternative) and NEC (V20/30; an 808x alternative) had a better one.
Unfortunately, most compilers/macro assembler use Intel slang by default.

However, if you're in trouble, a Z80 or V30 instruction manual is good to have.
The description is a bit easier to read, I think.
Most V20/V30 instructions are available on the 80186/80286, too.
Except that famous 8080 emulation mode (where in turn the Z80 manual comes in handy).

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 10 of 12, by maxtherabbit

User metadata
Rank l33t
Rank
l33t
eesz34 wrote on 2022-10-12, 17:23:
mkarcher wrote on 2022-10-12, 17:07:

On PC-compatible systems, the phantom drive "B:" is not provided by the BIOS, but by DOS. The intention of the phantom drive is that you can copy files from one floppy to a different floppy using "copy a:file.txt b:". DOS keeps record of whether the drive was accessed last using the letter "A:" or "B:", and when you access the other letter, DOS outputs the message "Please insert disk in drive X: and press enter to continue".

The easiest way to determine the number of floppy drives on AT-compatible computers is calling INT 13, AH=08. If a drive is present, you will get the type, if the drive is missing, you get the carry flag set. AH=08 is supported for hard drives since the XT (by the hard drive controller BIOS), but floppy drive support for AH=08 only appeared with the AT (in the mainboard BIOS). Another common way to determine the number of floppy drive (starting at the AT) is just checking the CMOS byte containing the drive types. The only PC compatible method is INT11, though, so I expect DOS to call INT11.

So how is the port address communicated? Or would DOS assume 0x3F0 and not use a secondary at 370? I'm pretty new at these level of details.

DOS doesn't communicate directly to the FDC port. It's all abstracted by BIOS services. 3F0 is baked into just about every PC-compatible BIOS.

Reply 11 of 12, by eesz34

User metadata
Rank Member
Rank
Member
maxtherabbit wrote on 2022-10-13, 01:16:
eesz34 wrote on 2022-10-12, 17:23:
mkarcher wrote on 2022-10-12, 17:07:

On PC-compatible systems, the phantom drive "B:" is not provided by the BIOS, but by DOS. The intention of the phantom drive is that you can copy files from one floppy to a different floppy using "copy a:file.txt b:". DOS keeps record of whether the drive was accessed last using the letter "A:" or "B:", and when you access the other letter, DOS outputs the message "Please insert disk in drive X: and press enter to continue".

The easiest way to determine the number of floppy drives on AT-compatible computers is calling INT 13, AH=08. If a drive is present, you will get the type, if the drive is missing, you get the carry flag set. AH=08 is supported for hard drives since the XT (by the hard drive controller BIOS), but floppy drive support for AH=08 only appeared with the AT (in the mainboard BIOS). Another common way to determine the number of floppy drive (starting at the AT) is just checking the CMOS byte containing the drive types. The only PC compatible method is INT11, though, so I expect DOS to call INT11.

So how is the port address communicated? Or would DOS assume 0x3F0 and not use a secondary at 370? I'm pretty new at these level of details.

DOS doesn't communicate directly to the FDC port. It's all abstracted by BIOS services. 3F0 is baked into just about every PC-compatible BIOS.

Oh ok. Makes sense. So that goes back to the need for a BIOS in lieu of a driver.

Reply 12 of 12, by Jo22

User metadata
Rank l33t++
Rank
l33t++

A helper driver is also possible.
DRIVER.SYS and DRIVPARM were used to fix floppy drive support.

http://info.wsisiz.edu.pl/~bse26236/batutil/h … lp/DRIVER_S.HTM

http://www.easydos.com/drivparm.html

For XTs, at least, there's also "2M-XBIOS"..
Re: I'm lost in PC's roots

More Than Two Floppy Drives:
http://www.seasip.info/VintagePC/floppies.html

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//