Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>int 25h absolute disk read <u>superseded</b></u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 25h                 Absolute Disk Read                         Superseded

    Reads from one or more logical sectors on the specified drive and
    copies the data to the specified buffer.

        Note    Int 25h has been superseded. Programs should use
                Read Track on Logical Device (Int 21h, function
                440Dh, minor code 61h).

                        Drive < 32 MB            Drive >= 32 MB (DOS 3.31+)
        Entry   AL    = Drive number             Drive number
                DS:BX = Addr of data buffer      Addr of DiskIO structure
                CX    = No. of sectors to read   0FFFFh
                DX    = First sector to read     Ignored if CX = 0FFFFh

        Return  Note   The flags register is left on the stack
                       Expect BP to be changed
                If CF is clear, disk sectors read into buffer
                or
                If CF is set, AL and AH contain error values

    ------------------------------------------------------------------

    The drive number in AL must be set to 0 for drive A:, 1 for drive
    B:, 2 for drive C:, etc. If the size of the specified drive is
    greater than or equal to 32 MB (CX = 0FFFFh), the DiskIO structure
    is required (DOS 3.31+).

    On return, Int 25h leaves the CPU flags on the stack. Programs
    should check the carry flag for an error before popping the flags
    from the stack.

    Int 25h does not process critical errors. If one occurs, the
    interrupt routine returns an error value to the program but does
    not issue Int 24h.

    Int 25h reads logical sectors only. This means, for example, that
    it cannot read hidden sectors.

    ------------------------------------------------------------------

    If Int 25h returns the carry flag set, AL and AH contain error
    values. The AL register specifies device-driver errors and
    contains one of the following values:

                Value   Meaning
                01h     Unknown unit
                02h     Drive not ready
                04h     CRC error in data
                06h     Seek error
                07h     Unknown media type
                08h     Sector not found
                0Bh     Read fault
                0Ch     General failure
                0Fh     Invalid media change

    For most computers, the AH register specifies ROM BIOS errors and
    may contain one of the following values:

                Value   Meaning
                01h     Bad command
                02h     Address mark not found
                04h     Sector not found
                10h     Data error (CRC error)
                20h     Controller failure
                40h     Seek failure
                80h     No response from drive

See Also: 440Dh /61h Int 24h Int 26h DiskIO

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson