INT 13h, 0Ah (10) Read Long diagnostics
Reads one or more long sectors into memory from a fixed disk. A long
sector is a sector of information plus 4 bytes representing the ECC
code for the sector. This service can be performed on fixed disks
only.
On entry: AH 0Ah
AL Number of sectors to read (1-127)
CH Cylinder number (10-bit value; upper 2 bits
in CL)
CL Starting sector number
DH Head number
DL Drive number
ES:BX Address of memory buffer
Returns: AH Status of operation (See Service 01h)
AL Number of sectors read
CF Set if error, else cleared
The service reads the specified number of long sectors starting at the
specified location (head, cylinder, and track) from a fixed disk into
a buffer starting at ES:BX.
Notes: This service is for diagnostics only. For a more
generalized version of the read sector command, see
Service 02h, which reads sectors for both diskettes
and fixed disks. Also see INT 25h (DOS), which
allows the reading of absolute sectors from any type
of block device.
The cylinder number is a ten-bit quantity (0 through
1023). Its most significant two bits are in bits 7
and 6 of CL; the remaining eight bits are in CH. The
starting sector number fits in the low-order portion
(lower 6 bits) of CL.
The value returned in AL (number of sectors read)
may not give the correct number of sectors, even
though there no reading error has occurred. Use the
results of the Carry flag and AH (status flag) to
determine the status of the operation.
The number of sectors to read (AL) can be 127
sectors at most.
If an error is encountered while reading a sector,
use Service 0h to reset the drive and retry the
operation. It is recommended that at least 3 retries
be attempted before an error is signalled, since the
error may have resulted from the diskette motor not
being up to speed.
Because of the architecture of the DMA channel, an
error will occur if the buffer in memory for the
sectors overlaps a 64K page boundary. A 64K page
boundary is a memory location which is one of the
following (10000h, 20000h, 30000h, etc.). Ensure
that no part of your buffer falls on this boundary.
If it does, create a new buffer or start the buffer
just after the boundary.
If an error 11h is returned, the data is good but
the BIOS is reporting that it was corrected via the
ECC error-correcting algorithm. The error may not
occur again if the information is written back out.
For the AT, XT-286, and PC Convertible, the BIOS
executes INT 15h, Service 90h (Device Busy), for the
diskette (Type = 01h) and the fixed disk (Type =
00h) prior to waiting for the interrupt. INT 15h,
Service 91h (Interrupt Complete), is executed upon
completion.
Seealso:
This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster