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 26h absolute disk write <u>superseded</b></u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 26h                 Absolute Disk Write                        Superseded

    Writes data from the specified buffer to one or more logical
    sectors on the specified drive.

        Note    Int 26h has been superseded. Programs should use
                Write Track on Logical Device (Int 21h, function
                440Dh, minor code 41h).

                        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 write  0FFFFh
                DX    = First sector to write    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 written
                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 26h leaves the CPU flags on the stack. Programs
    should check the carry flag for an error before popping the flags
    from the stack.

    Int 26h 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 26h writes logical sectors only. This means, for example, that
    the interrupt cannot write to hidden sectors.

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

    If Int 26h 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
                00h     Write-protection violation
                01h     Unknown unit
                02h     Drive not ready
                04h     Data error (CRC error)
                06h     Seek error
                07h     Unknown media type
                08h     Sector not found
                0Ah     Write 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 /41h Int 24h Int 25h DiskIO

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