Interrupt 26h   Absolute Disk Write                      

     These transfer  control directly to the device driver. On return,
     the original flags are still on  the  stack (put there by the INT
     instruction).  This  is  necessary  because return information is
     passed back in the current flags.

     The number  of sectors specified is transferred between the given
     drive  and  the  transfer  address.  Logical  sector  numbers are
     obtained  by  numbering each sector  sequentially  starting  from
     track 0, head 0, sector 1 (logical sector 0) and continuing along
     the same head, then to the next head until the last sector on the
     last head of the track is counted.   Thus,  logical  sector  1 is
     track 0, head 0, sector 2; logical sector 2 is  track  0, head 0,
     sector 3; and  so  on.  Numbering  then continues wih sector 1 on
     head  0 of the next track. Note that  although  the  sectors  are
     sequentially numbered (for example, sectors 2 and 3 on track 0 in
     the example above), they may  not be physically adjacent on disk,
     due to interleaving. Note that the mapping is different from that
     used by DOS 1.10 for dual-sided diskettes.

The request is as follows:

     INT 25 for Absolute Disk Read, INT 26 for Absolute Disk Write

Input

DOS1 Y DOS2 Y

DOS3

Y DOS5 Y

Output

AX

  Drive Number Result Code Int 24 Error Code AX

 

        BX

CX

 Number of Sectors     CX

DX

 First Sector     DX

DS:BX

Disk Transfer Address (Buffer) Set on Error CF
Drive Number:   0=A:, 1=B:, etc.

For DOS 4.xx extended read / write:

Input

DOS1 Y DOS2 Y

DOS3

Y DOS5 Y

Output

AX

  Drive Number Result Code Int 24 Error Code AX

 

        BX

CX

FFFFh     CX

DX

 First Sector     DX

DS:BX

Parameter Block Set on Error CF
Parameter Block:

        00h     DWORD   Logical Sector Number
        04h     WORD    Number of Sectors
        06h     DWORD   Pointer to Data Buffer

Result Code:

        01h     Bad command
        02h     Bad address mark
        03h     Write-protected disk
        04h     Requested sector not found
        08h     DMA failure
        10h     Data error (bad CRC)
        20h     Controller failed
        40h     Seek operation failed
        80h     Attachment failed to respond

Notes:

     1)   Original flags on stack! Be sure to pop the stack to prevent
          uncontrolled growth

     2)   Ints 25 and  26  will  try  rereading  a disk if they get an
          error the first time.

     3)   All registers except the segment registers are  destroyed by
          these calls

See Also INT/25h INT/13h/03h


Copyright © 1985 to 2022 Beta Systems                            Last modified: Wednesday, January 05, 2022 .