home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / asm / aspiprog / ma / aspidefs.inc next >
Encoding:
Text File  |  1991-06-18  |  4.7 KB  |  138 lines

  1. ;****************************************************************************;
  2. ;                                         ;
  3. ; Name:     ASPIDEFS.INC                             ;
  4. ;                                         ;
  5. ; Description:    ASPI definitions   (Assembly Language)                 ;
  6. ;                                         ;
  7. ; History  JMS    Version 1.0 4/26/91                         ;
  8. ;                                         ;
  9. ;****************************************************************************;
  10.  
  11. ;****************************************************************************;
  12. ;           %%% INT 21 Function call definitions for AX %%%             ;
  13. ;****************************************************************************;
  14. ASPI_Open    equ    3D00H    ;Open the ASPI driver
  15. ASPI_Get_Entry    equ    4402H    ;Get the entry point
  16. ASPI_Close    equ    3E00H    ;Close the ASPI driver
  17. ASPI_DOSExit    equ    4C00h    ;Exit to DOS
  18.  
  19. ;****************************************************************************
  20. ; *** SCSI I/O Request Structure ***
  21. ;
  22. ; Note that all elements in this structure are intended to be stored
  23. ; in Intel byte order.    All 32 bit fields have been split into WORD
  24. ; fields to avoid confusion.
  25. ;****************************************************************************
  26. SRBlock         STRUC
  27.  
  28.     _SRCmd        db    ?    ;Request Command
  29.     _SRStat     db    ?    ;Request Status
  30.     _SRHaId     db    ?    ;Host Adapter ID #
  31.     _SRFlags    db    ?    ;Request Flags
  32.             dd    ?    ;Reserved DWORD
  33.     _SRTarget    db    ?    ;Target Id
  34.     _SRLun        db    ?    ;Logical Unit Number
  35.     _SRBufLenLo    dw    ?    ;Data Allocation Length
  36.     _SRBufLenHi    dw    ?    ;
  37.     _SRSnsLen    db    ?    ;Sense Allocation Length
  38.     _SRBufPtrLo    dw    ?    ;Data Buffer Pointer
  39.     _SRBufPtrHi    dw    ?    ;
  40.     _SRNextPtrLo    dw    ?    ;Next request pointer for linking
  41.     _SRNextPtrHi    dw    ?    ;
  42.     _SRCDBLen    db    ?    ;CDB Length
  43.     _SRHaStat    db    ?    ;Host Adapter Status
  44.     _SRTargStat    db    ?    ;Target Status
  45.  
  46.     _SRPostOff    dw    ?    ;POST routine Offset
  47.     _SRPostCS    dw    ?    ;POST routine CS
  48.     _SRPostRealDS    dw    ?    ;Real Mode POST DS
  49.     _SRBPtrOff    dw    ?    ;Segment of SRB pointer
  50.     _SRBPtrSeg    dw    ?    ;Offset of SRB pointer
  51.             dw    ?    ;Reserved WORD
  52.  
  53.     _SRPhysAddrLo    dw    ?    ;Physical Address of the SRB
  54.     _SRPhysAddrHi    dw    ?
  55.  
  56.     _SRWkSpace    db    22 dup (?) ;Reserved for SCSI Manager Workspace
  57.  
  58. SRBlock         ENDS
  59.  
  60. CDB_SRBBlock        struc
  61.             db    (SIZE SRBlock) dup (?)
  62.     CDBByte     db    10 dup (?)
  63. CDB_SRBBlock        ends
  64.  
  65. ;****************************************************************************
  66. ; *** Other command fields ***
  67. ;****************************************************************************
  68. HABlock         struc            ;HA INQUIRY COMMAND
  69.             db    8 dup (?)
  70. _HACount        db    ?        ;# of Host Adapters
  71. _HAIdNum        db    ?        ;SCSI Id of the host adapter
  72. _SCSIMgrId        db    ?        ;SCSI Manager ID String
  73.             db    15 dup (?)
  74. _HAIdString        db    ?        ;Host Adapter ID String
  75.             db    15 dup (?)
  76. _HAUnique        db    ?        ;Host Adapter Unique paramters
  77. HABlock         ends            ;HA INQUIRY COMMAND
  78.  
  79. GDEVBlock        struc            ;GET DEVICE TYPE COMMAND
  80.             db    10 dup (?)
  81. _ScsiDevType        db    ?        ;Peripheral Device Type Byte
  82. GDEVBlock        ends            ;GET DEVICE TYPE COMMAND
  83.  
  84. ABORTBlock        struc            ;ABORT SCSI I/O REQUEST
  85.             db    8 dup (?)
  86. _AbortPtrLo        dw    ?        ;Pointer to SRBlock to Abort
  87. _AbortPtrHi        dw    ?
  88. ABORTBlock        ends            ;ABORT SCSI I/O REQUEST
  89.  
  90. BIOSBlock        struc            ;GET BIOS DRIVE INFORMATION
  91.             db    10 dup (?)
  92. _BIOSFlags        db    ?
  93. _Int13Drive        db    ?
  94. _HeadTranslation    db    ?
  95. _SectorTranslation    db    ?
  96. _BIOSReserved        db    ?
  97. BIOSBlock        ends            ;GET BIOS DRIVE INFORMATION
  98.  
  99.  
  100. ;****************************************************************************
  101. ; *** Flag Definitions ***
  102. ;****************************************************************************
  103. SRB_POST        equ    0001h        ;Interrupt POST enable/disable
  104. SRB_LINKED        equ    0002h        ;Next SRB field valid/invalid
  105. SRB_DIR_IN        equ    0008h
  106. SRB_DIR_OUT        equ    0010h
  107.  
  108. ;****************************************************************************
  109. ; *** Command Definitions ***
  110. ;****************************************************************************
  111. HA_INQ            equ    00h
  112. GET_TYPE        equ    01h
  113. EXEC_SIO        equ    02h
  114. ABORT_SRB        equ    03h
  115. RESET_DEV        equ    04h
  116. SET_HAPRMS        equ    05h
  117.  
  118. ;****************************************************************************
  119. ; *** SRStat Status values ***
  120. ;****************************************************************************
  121. SRB_PENDING        equ    00h
  122. SRB_COMP        equ    01h
  123. SRB_ABORTED        equ    02h
  124. SRB_ABORT_FAIL        equ    03h
  125. SRB_ERR         equ    04h
  126. INV_SPI_CMD        equ    80h
  127. INV_HA_ID        equ    81h
  128. DEV_NOT_INST        equ    82h
  129.  
  130. ;****************************************************************************
  131. ; *** Host Adapter Status ***
  132. ;****************************************************************************
  133. HASTAT_OK        equ    00h    ;Host adapter did not detect any error
  134. HASTAT_SELTOUT        equ    11h    ;Selection Timeout
  135. HASTAT_DO_DU        equ    12h    ;Data overrun data underrun
  136. HASTAT_UNXBF        equ    13h    ;Unexpected bus free
  137. HASTAT_BUSFAIL        equ    14h    ;Target bus phase sequence failure
  138.