User`s guide
BDOS FUNCTION 14: SELECT DISK
Entry Parameters:
Registers C: 0EH
Returned Value: E: Selected Disk
Registers A: Error Flag
H: Physical Error
The Select Disk function designates the disk drive named in register E as the
default disk for subsequent BDOS file operations. Register E is set to 0 for drive A,
1 for drive B, and so on through 15 for drive P in a full 16-drive system. In addition,
Function 14 logs in the designated drive if it is currently in the reset state. Logging-
in a drive activates the drive's directory until the next disk system reset or drive reset
operation.
FCBs that specify drive code zero (dr = 00H) automatically reference the currently
selected default drive. FCBs with drive code values between 1 and 16, however,
gnore the selected default drive and directly reference drives A through P.
Upon return, register A contains a zero if the select operation was successful. If a
physical error was encountered, the select function performs different actions depend-
ing on the BDOS error mode (see Function 45). If the BDOS error mode is in the
'default mode, a message identifying the error is displayed at the console, and the
calling program is terminated. Otherwise, the select function returns to the calling
program with register A set to OFFH and register H set to one of the following
physical error codes:
01 Disk I/O Error
04 Invalid drive
3-19
BDOS Function Calls CP/M 3 Programmers Guide