System information

Table 6-5. (continued)
Entry Point Function
HOME The disk head of the currently selected disk (initially disk A) is moved to
the track 00 position. If the controller allows access to the track 0 flag
from the drive, the head is stepped until the track 0 flag is detected. If the
controller does not support this feature, the HOME call is translated into a
call to SETTRK with a parameter of 0.
SELDSK The disk drive given by register C is selected for further operations, where
register C contains 0 for drive A, 1 for drive B, and so on up to 15 for
drive P (the standard CP/M distribution version supports four drives). On
each disk select, SELDSK must return in HL the base address of a 16-byte
area, called the Disk Parameter Header, described in Section 6.10. For
standard floppy disk drives, the contents of the header and associated
tables do not change; thus, the program segment included in the sample
CBIOS performs this operation automatically.
If there is an attempt to select a nonexistent drive, SELDSK returns HL =
0000H as an error indicator. Although SELDSK must return the header
address on each call, it is advisable to postpone the physical disk select
operation until an I/O function (seek, read, or write) is actually performed,
because disk selects often occur without ultimately performing any disk
I/O, , and many controllers unload the head of the current disk before
selecting the new drive. This causes an excessive amount of noise and disk
wear. The least significant bit of register E is zero if this is the first
occurrence of the drive select since the last cold or warm start.
SETTRK Register BC contains the track number for subsequent disk accesses on the
currently selected drive. The sector number in BC is the same as
the number returned from the SECTRAN entry point. You can choose
to seek the selected track at this time or delay the seek until the
next read or write actually occurs. Register BC can take on values in
the range 0-76 corresponding to valid track numbers for
standard floppy disk drives and 0-65535 for nonstandard disk
subsystems.
6.6 BIOS Entry Points CP/M Operating System Manual
6-22