Hi Carsten,
> The book "DOS Internals" by Geoff Chappell > (https://www.geoffchappell.com/notes/dos/internals/index.htm) has a good > discussion on the matter in Section "Logical Drive Mapping", Page 633ff. > > INT 2Fh Function 4a00h has never been documented by Microsoft and even > Microsoft has missed to used that API in "MSD" and "Windows 3x" > (according to the book it even can "hang" Windows). That would be strange, given that Windows 3 in 386 enhanced mode explicitly manipulates the internal workings of that function, so having a way to mess with it seems required for enhanced mode. My guess would be that this is for being able to have multiple DOS windows open simultaneously in Windows. As DOS is not made to be reentrant, Windows demands that most internal variables are organized in such ways that it can swap them between tasks. Int 2f.4a00 also is documented in RBIL, which is a popular text. > A TSR hooking INT 2Fh (4a00h) would disable the message, but will create > the situation where write access that (maybe by accident) is directed to > drive B: will end up accessing drive A:, causing potential data loss. I partially agree. My suggestion would be that the TSR keeps track of which virtual disk is inserted at the moment and just set some "no disk in drive" or similar flag in the DOS drive tables for the time where "B:" is inserted. Yet, if you only disable messages, there is no real problem either: The user would fail to be aware that they were supposed to take one disk out and insert another one, but in the end, they just have two drive letters "secretly" taking turns for accessing the same drive. > Without support from the kernel it might be possible to manipulate the > DPB (Drive Parameter Block) to remove or invalidate drive B:, or write a > TSR that hooks INT 13h and terminates all access to B: with an error While this is in part what I suggest above, the DJ mechanism always accesses the physical BIOS A: drive even while switched to B: When you hook int 13, it sees no difference. So yes, my suggestion would be to mark the floppy as "not inserted" or similar exactly during the periods where the DJ is switched to B: but again this would only be useful to "educate" the user. Without such manipulations, your drive would simply behave like an "automated DJ" and DOS would stick alternating drive letters to your actually unchanged floppy. Greetings, Eric PS: I guess you could create confusion when you have files open on A: and B: simultaneously, but even then, DOS would just silently switch between the "2" virtual (in reality: same) disks as needed. _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel