EDIT: Protectmode handler called from realmode (Developers)
> I don't think it makes any recursive INT 13h calls (I'll verify this before
> the next release).
I just checked, and USBDRIVE does, in fact, make a recursive INT 13h call in one place, which I believe is justified.
I make a recursive call in INT 13h, function 8 (Get Drive Parameters). One of the values this returns is the total number of INT 13h drive currently numbers in use (in the DL register). The only way I know of to test whether a specific INT 13h drive number is valid or not is to issue a different INT 13h request, function 10h (Check Ready).
Since there is the possibility that another INT 13h TSR driver could have been installed after USBDRIVE, at the time the "Get Drive Parameters" request is made to USBDRIVE, it does not know for certain how many INT 13h drives are currently in existence. The only way to calculate this is to issue an INT 13h "Check Ready" request for each possible INT 13h disk number, and count up how many appropriate responses are received. This is what USBDRIVE does.
The other possibility is to use the value stored in the BIOS Data Area (BDA) at 0040:0075, which is supposed to be the number of INT 13h drives (according to the BIOS). However, I have been told by what I consider to be reliable sources that this number cannot always be trusted for various reasons (i.e., SYS or TSR drivers do not always update this value when they should, or drivers that get uninstalled may leave "holes" in the INT 13h numbers that can cause problems in certain cases).
It's possible that INT 13h, function 8 simply expects the number from 0040:0075 to be copied into DL for the return, but that is not what USBDRIVE does.
Any suggestions or commentary?
Complete thread:
- Protectmode handler called from realmode - Laaca, 12.08.2010, 21:12 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Protectmode handler called from realmode - ecm, 12.08.2010, 21:24
- Protectmode handler called from realmode - Laaca, 13.08.2010, 01:46
- Protectmode handler called from realmode - Japheth, 13.08.2010, 07:31
- Protectmode handler called from realmode - bretjohn, 13.08.2010, 18:43
- EDIT: Protectmode handler called from realmode - bretjohn, 13.08.2010, 19:25
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 26.08.2010, 09:33
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 26.08.2010, 19:03
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 27.08.2010, 03:25
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 27.08.2010, 16:47
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 28.08.2010, 01:26
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 28.08.2010, 16:35
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 06.09.2010, 20:10
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 28.08.2010, 16:35
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 28.08.2010, 01:26
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 27.08.2010, 16:47
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 27.08.2010, 03:25
- Volumes vs physical storage media | WAS "Protectmod handl" - bretjohn, 26.08.2010, 19:03
- Volumes vs physical storage media | WAS "Protectmod handl" - DOS386, 26.08.2010, 09:33
- EDIT: Protectmode handler called from realmode - bretjohn, 13.08.2010, 19:25
- Protectmode handler called from realmode - bretjohn, 13.08.2010, 18:43
- Protectmode handler called from realmode - Japheth, 13.08.2010, 07:31
- Protectmode handler called from realmode - Laaca, 13.08.2010, 01:46
- Protectmode handler called from realmode - ecm, 12.08.2010, 21:24
Mix view