Did the 8086 have
http://www.ctyme.com/intr/rb-0621.htm
Or something like it? How else can i get a floppy drive or disk parameters if the link does not exist for it?
Would i be better off getting data when the user asks to check the drive, load the bootloader and get data from it?
Get disk parameters
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Get disk parameters
If you're using your own bootloader, you can pass a pointer to the BPB (provided you're using FAT) and the kernel could grab data directly from that when it first boots. Load the boot sector when a different disk is inserted and read from its BPB.
Considering the header for that function includes "(PC,XT286,CONV,PS,ESDI,SCSI)", I'd say the 8086 based IBM PCs include it. No guarantees for clones though.
Considering the header for that function includes "(PC,XT286,CONV,PS,ESDI,SCSI)", I'd say the 8086 based IBM PCs include it. No guarantees for clones though.
Re: Get disk parameters
What's the point if the location of the BPB in any FAT bootloader is the same? Ill have a design that reads my own bootloader, like it reads everyone else's to save space.Blacklight wrote:If you're using your own bootloader, you can pass a pointer to the BPB (provided you're using FAT) and the kernel could grab data directly from that when it first boots.
Sounds like an idea, The kernel has its own process, during this loop when the floppy drive is ejected or has new media it will parse the bootloader of the new disk.Blacklight wrote: Load the boot sector when a different disk is inserted and read from its BPB.
Is what discourages me, i figure XT286 AND UP use it, but what about the XT before the XT286Blacklight wrote:XT286
Re: Get disk parameters
From the second sentence of your own link: "For systems predating the IBM AT, this call is only valid for hard disks."
For floppies, I'd say -- try reading track 1 through n. When it fails, that's your maximum cylinder number. Then try reading side 2 of the disk. If it fails, it's single sided. Then you know.
For floppies, I'd say -- try reading track 1 through n. When it fails, that's your maximum cylinder number. Then try reading side 2 of the disk. If it fails, it's single sided. Then you know.