Article ID: 79027 - View products that this article applies to.
This article was previously published under Q79027
This article has been archived. It is offered "as is" and will no longer be updated.
When using the CURDIR$ or DIR$ function, or the CHDRIVE statement in Basic Professional Development System (PDS) on a single floppy system, the MS-DOS message
Insert Diskette for Drive B: and press any key when ready
Insert Diskette for Drive A: and press any key when readywill appear if you attempt to access a single floppy drive as both drives A and B in the same program. In many cases, this message is inconvenient because it clutters the output screen. This is an MS-DOS message that can be suppressed using the method below.
This information applies to Microsoft Basic PDS versions 7.0 and 7.1 for MS-DOS.
The above message will only appear when the program is running on a single floppy system, because MS-DOS allows that one floppy to be referenced as logical drive A or B. However, when you change the drive reference (such as by typing "a:" then "b:", or by using any of the Basic functions that change from drive A or B to the other drive), MS-DOS prompts you with the message above. If a disk is already in the drive, press a key to continue the operation.
If you are using a user-interface screen or menu, you may want to suppress this message. To do so, you can call interrupt 11 hex to detect whether the system has only one floppy drive. After the call, bytes 6 and 7 of the ax register will contain a number that represents the number of floppy drives on the system.
If it is determined that only one floppy drive is present, you can call interrupt 21 with function 44 hex with subfunction 0F hex to set the current drive specification for the floppy. Doing this will suppress the MS-DOS message.
To run this program in the QBX.EXE environment, start with the following line, which will load the QBX.QLB Quick library:
Article ID: 79027 - Last Review: October 7, 2013 - Revision: 3.1
Contact us for more help
Connect with Answer Desk for expert help.