home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddrivers.zip / INCLUDE / ABIOS.H next >
Text File  |  1992-12-23  |  42KB  |  884 lines

  1. // ABIOS Entry Point Codes     
  2.  
  3. #define ABIOS_EP_START               0x00
  4. #define ABIOS_EP_INTERRUPT           0x01
  5. #define ABIOS_EP_TIMEOUT             0x02
  6.  
  7. // ABIOS Function Codes        
  8.  
  9. #define ABFC_DEFAULT_INT_HANDLER     0x00
  10. #define ABFC_RET_LID_PARMS           0x01
  11. #define ABFC_READ_DEVICE_PARMS       0x03
  12. #define ABFC_SET_DEVICE_PARMS        0x04
  13. #define ABFC_RESET_DEVICE            0x05
  14.  
  15. // ABIOS Function Codes Specific to Diskette - Device ID 0x01 
  16.  
  17. #define ABFC_DSKT_RESET_INTERRUPT    0x07
  18. #define ABFC_DSKT_READ               0x08
  19. #define ABFC_DSKT_WRITE              0x09
  20. #define ABFC_DKST_FORMAT             0x0A
  21. #define ABFC_DSKT_VERIFY             0x0B
  22. #define ABFC_DSKT_READ_MEDIA_PARMS   0x0C
  23. #define ABFC_DSKT_SET_MEDIA_TYPE     0x0D
  24. #define ABFC_DSKT_READ_CHGSIGNAL     0x0E
  25. #define ABFC_DSKT_TURN_OFF_MOTOR     0x0F
  26. #define ABFC_DKST_INT_STATUS         0x10
  27. #define ABFC_DSKT_GET_MEDIA_TYPE     0x11
  28.  
  29. // ABIOS Function Codes Specific to Fixed Disk - Device ID 0x02 
  30.  
  31. #define ABFC_DISK_READ               0x08
  32. #define ABFC_DISK_WRITE              0x09
  33. #define ABFC_DISK_WRITE_VERIFY       0x0A
  34. #define ABFC_DISK_VERIFY             0x0B
  35. #define ABFC_DISK_INTERRUPT_STATUS   0x0C
  36. #define ABFC_DISK_SET_DMA_PACING     0x10
  37. #define ABFC_DISK_RET_DMA_PACING     0x11
  38. #define ABFC_DISK_TRANSFER_SCB       0x12
  39. #define ABFC_DISK_DEALLOC_LID        0x14
  40. #define ABFC_DISK_GET_SCSI_PARMS     0x1A
  41.  
  42. // ABIOS Function Codes Specific to the SCSI Adapter - Device ID 0x17 
  43.  
  44. #define ABFC_SCSIA_RET_DEVICE_CONFIG 0x0B
  45. #define ABFC_SCSIA_RET_INTERRUPT_LID 0x0C
  46. #define ABFC_SCSIA_ENABLE_CACHE      0x0D       // ???? 
  47. #define ABFC_SCSIA_DISABLE_CACHE     0x0E       // ???? 
  48. #define ABFC_SCSIA_CACHE_STATUS      0x0F       // ???? 
  49. #define ABFC_SCSIA_SET_DMA_PACING    0x10
  50. #define ABFC_SCSIA_RET_DMA_PACING    0x11
  51. #define ABFC_SCSIA_TRANSFER_SCB      0x12
  52.  
  53. // ABIOS Function Codes Specific to the SCSI Peripheral Type - Device ID 0x18 
  54.  
  55. #define ABFC_SCSIP_SET_DEV_TIMEOUT   0x10
  56. #define ABFC_SCSIP_READ_DEV_TIMEOUT  0x11
  57. #define ABFC_SCSIP_TRANSFER_SCB      0x12
  58. #define ABFC_SCSIP_DEALLOC_SCSI_DEV  0x14
  59. #define ABFC_SCSIP_ALLOC_SCSI_DEV    0x15
  60. #define ABFC_SCSIP_RET_TYPE_COUNT    0x16
  61. #define ABFC_SCSIP_ABORT             0x17
  62.  
  63. //  ABIOS Request Block Header 
  64.  
  65. typedef struct _ABRBH  {                // ABH 
  66.  
  67.   USHORT        Length;                 // 00H -  Request Block Length  
  68.   USHORT        LID;                    // 02H -  Logical ID            
  69.   USHORT        Unit;                   // 04H -  Unit                  
  70.   USHORT        Function;               // 06H -  Function              
  71.   ULONG         Reserved_1;             // 08H -  Reserved              
  72.   USHORT        RC;                     // 0CH -  Return Code           
  73.   USHORT        Timeout;                // 0EH -  Time-Out              
  74.  
  75. } ABRBH;
  76.  
  77. typedef ABRBH near *NPABRBH;
  78.  
  79. // Return LID Parms             - 0x01 
  80.  
  81. typedef struct _ABRB_RETLIDPARMS  {     // ABRLP 
  82.  
  83.   ABRBH         abrbh;                  // 00H - Request Block Header     
  84.   UCHAR         HwIntLevel;             // 10H - Hardware Interrupt Level 
  85.   UCHAR         ArbLevel;               // 11H - Arbitration Level        
  86.   USHORT        DeviceID;               // 12H - Device ID                
  87.   USHORT        cUnits;                 // 14H - Count of Units           
  88.   USHORT        LIDFlags;               // 16H - Logical ID Flags         
  89.   USHORT        RBLength;               // 18H - Request Block Length     
  90.   UCHAR         SecDeviceID;            // 1AH - Secondary Device ID      
  91.   UCHAR         Revision;               // 1BH - Revision                 
  92.   ULONG         Reserved_1;             // 1CH - Reserved, MBZ            
  93.  
  94. } ABRB_RETLIDPARMS;
  95.  
  96. typedef ABRB_RETLIDPARMS near *NPABRB_RETLIDPARMS;
  97.  
  98. #define LF_16MB_SUPPORT         0x0020  
  99. #define LF_CONCURRENT           0x0008
  100. #define LF_PHYSICAL_PTRS        0x0002
  101. #define LF_LOGICAL_PTRS         0x0001
  102.  
  103. // Diagnostics                                        
  104.  
  105. typedef struct _ABRBDIAGS  {            // ABD 
  106.  
  107.   UCHAR         Reserved_5;             // Reserved                     
  108.   UCHAR         ErrorLogLength;         // Error log length             
  109.   UCHAR         IntLevel;               // Interrupt level              
  110.   UCHAR         ArbLevel;               // Arbitration level            
  111.   USHORT        DeviceID;               // Device ID                    
  112.   UCHAR         CmdtoCtrlr;             // Command to controller        
  113.   UCHAR         St0;                    //                              
  114.   UCHAR         St1;                    //                              
  115.   UCHAR         St2;                    //                              
  116.   UCHAR         Cylinder;               //                              
  117.   UCHAR         Head;                   //                              
  118.   UCHAR         Sector;                 //                              
  119.   UCHAR         SectorSize;             //                              
  120. } ABRBDIAGS;
  121.  
  122. // Read Device Parms (Diskette)   0x03 
  123.  
  124. typedef struct _ABRB_DSKT_READDEVPARMS { // AB1RDP 
  125.  
  126.   ABRBH         abrbh;                  // 00H - Request Block Header     
  127.   USHORT        SectorsPerTrack;        // 10H - Sectors per track        
  128.   USHORT        BlockSize;              // 12H - Size of sector in bytes  
  129.   USHORT        DevCtrlFlags;           // 14H - Device Control Flags     
  130.   USHORT        UnitType;               // 16H - Diskette Unit Type       
  131.   USHORT        Reserved_1;             // 18H - Reserved, MBZ            
  132.   USHORT        Undefined_1;            // 1AH - Undefined                
  133.   ULONG         MotorOffTime;           // 1CH - Motor off time (usecs)   
  134.   ULONG         MotorStartTime;         // 20H - Motor start time (usecs) 
  135.   USHORT        Undefined_2;            // 24H - Undefined                
  136.   USHORT        cCylinders;             // 26H - Max Cylinders for drive  
  137.   USHORT        Undefined_3;            // 28H - Undefined                
  138.   UCHAR         cHeads;                 // 2AH - Number of heads          
  139.   UCHAR         RetryCount;             // 2BH - Recommended retry count  
  140.   UCHAR         FillByte;               // 2CH - Fill byte for format     
  141.   ULONG         HeadSettleTime;         // 2DH - Head Settle Time         
  142.   UCHAR         ReadGap;                // 31H - Gap length for RWV       
  143.   UCHAR         FormatGap;              // 32H - Gap length for format    
  144.   UCHAR         DataLen;                // 33H - Data Length              
  145.  
  146. } ABRB_DSKT_READDEVPARMS;
  147.  
  148. typedef ABRB_DSKT_READDEVPARMS near *NPABRB_DSKT_READDEVPARMS;
  149.  
  150. // BlockSize equates in ABRB_DSKT_READDEVPARMS & ABRB_DSKT_SETDEVPARMS 
  151.  
  152. #define DP_BLOCKSIZE_256        0x01    // 256 bytes per sector        
  153. #define DP_BLOCKSIZE_512        0x02    // 512 bytes per sector        
  154.  
  155. // DevCtrlFlag equates in ABRB_DSKT_READDEVPARMS                       
  156.  
  157. #define DP_ABDEFGAPLEN          0x0040  // ABIOS defines FORMAT GAP    
  158. #define DP_RECALREQUIRED        0x0008  // Recalibrate is required     
  159. #define DP_CONCURRENT_DSKT      0x0004  // Current diskette unit       
  160. #define DP_FORMATSUPPORTED      0x0002  // Format Unit supported       
  161. #define DP_CHANGELINE_AVAIL     0x0001  // Change line avail on drive  
  162.  
  163. // UnitType equates in ABRB_DSKT_READDEVPARMS                          
  164.  
  165. #define DP_DRIVENOTPRES         0x00    // Drive not present           
  166. #define DP_DRIVETYPE_360KB      0x01    // 360  KB diskette drive      
  167. #define DP_DRIVETYPE_12OOKB     0x02    // 1.2  MB diskette drive      
  168. #define DP_DRIVETYPE_720KB      0x03    // 720  KB diskette drive      
  169. #define DP_DRIVETYPE_144OKB     0x04    // 1.44 MB diskette drive      
  170. #define DP_DRIVETYPE_2880KB     0x06    // 2.88 MB diskette drive      
  171.  
  172. // Set Device Parms (Diskette)    0x04 
  173.  
  174. typedef struct _ABRB_DSKT_SETDEVPARMS { // AB1SDP 
  175.  
  176.   ABRBH         abrbh;                  // 00H - Request Block Header     
  177.   USHORT        Reserved_1;             // 10H - Reserved, MBZ            
  178.   USHORT        BlockSize;              // 12H - Block Size               
  179.   UCHAR         Undefined_1[29];        // 14H - Undefined                
  180.   UCHAR         ReadGap;                // 31H - Gap length for RWV       
  181.   UCHAR         Undefined_2;            // 32H - Undefined                
  182.   UCHAR         DataLen;                // 33H - Data Length              
  183.  
  184. } ABRB_DSKT_SETDEVPARMS;
  185.  
  186. typedef ABRB_DSKT_SETDEVPARMS near *NPABRB_DSKT_SETDEVPARMS;
  187.  
  188. // Reset/Initialize            (Diskette)     0x05  
  189.  
  190. typedef struct _ABRB_DSKT_RESET  {      // AB1RS 
  191.  
  192.   ABRBH         abrbh;                  // 00H - Request Block Header      
  193.   USHORT        Reserved_1;             // 10H - Reserved, MBZ             
  194.  
  195. } ABRB_DSKT_RESET;
  196.  
  197. typedef ABRB_DSKT_RESET near *NPABRB_DSKT_RESET;
  198.  
  199. // Disable Interrupt           (Diskette)     0x07  
  200.  
  201. typedef struct _ABRB_DISABLE  {         // AB1DI 
  202.  
  203.   ABRBH         abrbh;                  // 00H - Request Block Header      
  204.   UCHAR         Undefined_1[8];         // 10H - Undefined                 
  205.   USHORT        Reserved_1;             // 18H - Reserved, MBZ             
  206.  
  207. } ABRB_DSKT_DISABLE;
  208.  
  209. typedef ABRB_DSKT_DISABLE near *NPABRB_DSKT_DISABLE;
  210.  
  211. // Read, Write, Verify (Diskette)    0x08,0x09,0x0B   
  212.  
  213. typedef struct _ABRB_DSKT_RWV  {        // AB1RWV 
  214.  
  215.   ABRBH         abrbh;                  // 00H - Request Block Header      
  216.   USHORT        Reserved_1;             // 10H - Reserved, MBZ             
  217.   ULONG         pIObuffer;              // 12H - Logical ptr to I/O buffer 
  218.   ULONG         Reserved_2;             // 16H - Reserved, MBZ             
  219.   ULONG         ppIObuffer;             // 1AH - Physical ptr to I/O buffer
  220.   USHORT        Reserved_3;             // 1EH - Reserved, MBZ             
  221.   ULONG         WaitTime;               // 20H - Wait time before resuming 
  222.   USHORT        cSectors;               // 24H - Count of sectors to xfer  
  223.   USHORT        Cylinder;               // 26H - Cylinder number (0-based) 
  224.   USHORT        Undefined_1;            // 28H - Undefined                 
  225.   UCHAR         Head;                   // 2AH - Head number (0-based)     
  226.   UCHAR         Undefined_2[6];         // 2BH - Undefined                 
  227.   USHORT        Sector;                 // 31H - Sector number (1-based)   
  228.   ABRBDIAGS     DiagS;                  // 33H - Diagnostic status         
  229. } ABRB_DSKT_RWV;
  230.  
  231. typedef ABRB_DSKT_RWV near *NPABRB_DSKT_RWV;
  232.  
  233. // Format                        (Diskette)    0x0A   
  234.  
  235. typedef struct _ABRB_DSKT_FORMAT  {     // AB1FMT 
  236.  
  237.   ABRBH         abrbh;                  // 00H - Request Block Header      
  238.   USHORT        Reserved_1;             // 10H - Reserved, MBZ             
  239.   ULONG         pFormatTable;           // 12H - Log ptr to format table   
  240.   ULONG         Reserved_2;             // 16H - Reserved, MBZ             
  241.   ULONG         ppFormatTable;          // 1AH - Phys ptr to format table  
  242.   USHORT        Reserved_3;             // 1EH - Reserved, MBZ             
  243.   ULONG         WaitTime;               // 20H - Wait time before resuming 
  244.   USHORT        Subfunction;            // 24H - Subfunction number        
  245.   USHORT        Cylinder;               // 26H - Cylinder number (0-based) 
  246.   USHORT        Undefined_1;            // 28H - Undefined                 
  247.   UCHAR         Head;                   // 2AH - Head number (0-based)     
  248. } ABRB_DSKT_FMT;
  249.  
  250. typedef ABRB_DSKT_FMT near *NPABRB_DSKT_FMT;
  251.  
  252. // Read Media Parms (Diskette)    0x0C 
  253.  
  254. typedef struct _ABRB_DSKT_READMEDIAPARMS {   // AB1RMP 
  255.  
  256.   ABRBH         abrbh;                  // 00H - Request Block Header      
  257.   USHORT        SectorsPerTrack;        // 10H - Sectors per track         
  258.   USHORT        BlockSize;              // 12H - Size of sector in bytes   
  259.   USHORT        Undefined_1;            // 14H - Undefined                 
  260.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  261.   UCHAR         Undefined_2[14];        // 18H - Undefined                 
  262.   USHORT        cCylinders;             // 26H - Number of cylinders       
  263.   USHORT        Undefined_3;            // 28H - Undefined                 
  264.   UCHAR         cHeads;                 // 2AH - Number of heads           
  265.   UCHAR         Undefined_4[6];         // 2BH - Undefined                 
  266.   UCHAR         ReadGap;                // 31H - Gap length for RWV        
  267.   UCHAR         FormatGap;              // 32H - Gap length for format     
  268.   UCHAR         DataLen;                // 33H - Data Length               
  269.  
  270. } ABRB_DSKT_READMEDIAPARMS;
  271.  
  272. typedef ABRB_DSKT_READMEDIAPARMS near *NPABRB_DSKT_READMEDIAPARMS;
  273.  
  274. // Set Media Type for Format (Diskette)   0x0D 
  275.  
  276. typedef struct _ABRB_DSKT_SETMEDIATYPE {   // AB1SMT 
  277.  
  278.   ABRBH         abrbh;                  // 00H - Request Block Header      
  279.   USHORT        SectorsPerTrack;        // 10H - Sectors per track         
  280.   USHORT        BlockSize;              // 12H - Size of sector in bytes   
  281.   USHORT        Undefined_1;            // 14H - Undefined                 
  282.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  283.   UCHAR         Undefined_2[8];         // 18H - Undefined                 
  284.   ULONG         WaitTime;               // 20H - Wait time before resuming 
  285.   USHORT        Undefined_3;            // 24H - Undefined                 
  286.   USHORT        cTracks;                // 26H - Number of tracks to format
  287.   ULONG         Undefined_4;            // 28H - Undefined                 
  288.   UCHAR         FillByte;               // 2CH - Fill byte for format      
  289.   UCHAR         Undefined_5[5];         // 2DH - Undefined                 
  290.   UCHAR         FormatGap;              // 32H - Gap length for format     
  291.  
  292. } ABRB_DSKT_SETMEDIATYPE;
  293.  
  294. typedef ABRB_DSKT_SETMEDIATYPE near *NPABRB_DSKT_SETMEDIATYPE;
  295.  
  296. // Read Change Line Status   (Diskette)   0x0E 
  297.  
  298. typedef struct _ABRB_DSKT_READCHGLINE { // AB1RCL 
  299.  
  300.   ABRBH         abrbh;                  // 00H - Request Block Header      
  301.   UCHAR         ChangeLineStatus;       // 10H - Change Line status        
  302.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  303.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  304.  
  305. } ABRB_DSKT_READCHGLINE;
  306.  
  307. typedef ABRB_DSKT_READCHGLINE near *NPABRB_DSKT_READCHGLINE;
  308.  
  309. // ChangeLineStatus equates in ABRB_DSKT_REACHGLINE                       
  310.  
  311. #define CHANGELINE_INACTIVE     0x00    // Change Line Inactive           
  312. #define CHANGELINE_ACTIVE       0x06    // Change Line Active             
  313.  
  314. // Turn Off Motor            (Diskette)   0x0F 
  315.  
  316. typedef struct _ABRB_DSKT_MOTOROFF  {   // AB1MO  
  317.  
  318.   ABRBH         abrbh;                  // 00H - Request Block Header      
  319.   UCHAR         Undefined_1[6];         // 10H - Undefined                 
  320.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  321.  
  322. } ABRB_DSKT_MOTOROFF;
  323.  
  324. typedef ABRB_DSKT_MOTOROFF    near *NPABRB_DSKT_MOTOROFF;
  325.  
  326. // Interrupt Status          (Diskette)   0x10 
  327.  
  328. typedef struct _ABRB_DSKT_INTRSTATUS {  // AB1IS 
  329.  
  330.   ABRBH         abrbh;                  // 00H - Request Block Header      
  331.   UCHAR         InterruptStatus;        // 10H - Interrupt Status          
  332.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  333.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  334.  
  335. } ABRB_DSKT_INTRSTATUS;
  336.  
  337. typedef ABRB_DSKT_INTRSTATUS near *NPABRB_DSKT_INTRSTATUS;
  338.  
  339. // InterruptStatus equates in ABRB_DSKT_INTRSTATUS                        
  340. #define NO_INTERRUPT            0x00    // No Interrupt                   
  341. #define INTERRUPT_PENDING       0x01    // Interrupt Pending              
  342.  
  343. // Get Media Type            (Diskette)   0x11 
  344.  
  345. typedef struct _ABRB_DSKT_GETMEDIATYPE { // AB1GMT 
  346.  
  347.   ABRBH         abrbh;                  // 00H - Request Block Header      
  348.   UCHAR         MediaType;              // 10H - Diskette Media Type       
  349.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  350.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  351.  
  352. } ABRB_DSKT_GETMEDIATYPE;
  353.  
  354. typedef ABRB_DSKT_GETMEDIATYPE near *NPABRB_DSKT_GETMEDIATYPE;
  355.  
  356. // MediaType equates in ABRB_DSKT_GETMEDIATYPE                            
  357. #define MEDIA1MB                     0x03
  358. #define MEDIA2MB                     0x04
  359. #define MEDIA4MB                     0x06
  360.  
  361. // Read Device Parms (Fixed Disk) 0x03 
  362.  
  363. typedef struct _ABRB_DISK_READDEVPARMS {  // AB2RDP 
  364.  
  365.   ABRBH         abrbh;                  // 00H - Request Block Header      
  366.   USHORT        SectorsPerTrack;        // 10H - Sectors per track         
  367.   USHORT        BlockSize;              // 12H - Size of sector in bytes   
  368.   USHORT        DevCtrlFlags;           // 14H - Device Control Flags      
  369.   UCHAR         LUN;                    // 16H - Logical Unit Number (SCSI)
  370.   UCHAR         Undefined_1;            // 17H - Undefined                 
  371.   ULONG         cCylinders;             // 18H - Count of cylinders        
  372.   UCHAR         cHead;                  // 1CH - Count of heads            
  373.   UCHAR         RetryCount;             // 1DH - Suggested retry count     
  374.   USHORT        Undefined_2;            // 1EH - Undefined                 
  375.   ULONG         cRBA;                   // 20H - Count of RBAs on this unit
  376.   ULONG         Reserved_1;             // 24H - Reserved                  
  377.   USHORT        Reserved_2;             // 28H - Reserved                  
  378.   USHORT        Undefined_3;            // 2AH - Undefined                 
  379.   USHORT        MaxXferCount;           // 2CH - Max blocks per transfer   
  380.  
  381. } ABRB_DISK_READDEVPARMS;
  382.  
  383. typedef ABRB_DISK_READDEVPARMS near *NPABRB_DISK_READDEVPARMS;
  384.  
  385. // DevCtrlFlag equates in ABRB_DISK_READDEVPARMS                           
  386.  
  387. #define DP_SCBXFER              0x8000  // SCB Transfer Function supported 
  388. #define DP_SCSI_DEVICE          0x4000  // Drive is SCSI device            
  389. #define DP_FORMAT_UNIT          0x1000  // Format Unit supported           
  390. #define DP_FORMAT_TRACK         0x0800  // Format Track supported          
  391. #define DP_ST506                0x0400  // Drive is ST506 device           
  392. #define DP_CONCURRENT_DISK      0x0200  // Concurrent disk unit per LID    
  393. #define DP_EJECTABLE            0x0100  // Ejectable unit                  
  394. #define DP_MEDIA_ORGANIZATION   0x0080  // 0=Random, 1=Sequential          
  395. #define DP_LOCKING_AVAIL        0x0040  // Locking capability supported    
  396. #define DP_READABLE             0x0020  // Unit is readable                
  397. #define DP_CACHE_AVAIL          0x0010  // Caching is supported            
  398. #define DP_WRITE_FREQUENCY      0x0008  // 0=Write once, 1=Write many      
  399. #define DP_CHGLINE_DISK         0x0004  // Change line supported           
  400. #define DP_POWER                0x0002  // 0=Power on, 1=Power off         
  401. #define DP_LOGDATAPTR           0x0001  // Device needs logical data poineter 
  402.  
  403. // Reset/Initialize               (Disk)      0x05  
  404.  
  405. typedef struct _ABRB_DISK_RESET  {      // AB2RS 
  406.  
  407.   ABRBH         abrbh;                  // 00H - Request Block Header      
  408.   USHORT        Reserved_1;             // 10H - Reserved, MBZ             
  409.   UCHAR         Undefined_1[22];        // 12H - Undefined                 
  410.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  411.  
  412. } ABRB_DISK_RESET;
  413.  
  414. typedef ABRB_DISK_RESET near *NPABRB_DISK_RESET;
  415.  
  416. // Read, Write, WriteVerify, Verify (Fixed Disk)  0x08,0x09,0x0A,0x0B   
  417.  
  418. typedef struct _ABRB_DISK_RWV  {        // AB2RWV 
  419.  
  420.   ABRBH         abrbh;                  // 00H - Request Block Header      
  421.   USHORT        Reserved_1;             // 10H - Reserved, MBZ             
  422.   ULONG         pIObuffer;              // 12H - Logical ptr to I/O buffer 
  423.   USHORT        Reserved_2;             // 16H - Reserved, MBZ             
  424.   USHORT        Reserved_3;             // 18H - Reserved, MBZ             
  425.   ULONG         ppIObuffer;             // 1AH - Physical ptr to I/O buffer
  426.   USHORT        Reserved_4;             // 1EH - Reserved, MBZ             
  427.   ULONG         RBA;                    // 20H - RBA                       
  428.   ULONG         Reserved_5;             // 24H - Reserved, MBZ             
  429.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  430.   USHORT        cBlocks;                // 2CH - Count of blocks to xfer   
  431.   UCHAR         Flags;                  // 2EH - Flags                     
  432.   USHORT        SoftError;              // 2FH - Soft error word           
  433.  
  434. } ABRB_DISK_RWV;
  435.  
  436. typedef ABRB_DISK_RWV near *NPABRB_DISK_RWV;
  437.  
  438. // Flags equates in ABRB_DSKT_RWV                                         
  439.  
  440. #define RW_DONT_CACHE           0x01    // Dont cache this request        
  441.  
  442. // Interrupt Status          (Disk)       0x0C 
  443.  
  444. typedef struct _ABRB_DISK_INTRSTATUS  { // AB2IS 
  445.  
  446.   ABRBH         abrbh;                  // 00H - Request Block Header      
  447.   UCHAR         InterruptStatus;        // 10H - Interrupt Status          
  448.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  449.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  450.  
  451. } ABRB_DISK_INTRSTATUS;
  452.  
  453. typedef ABRB_DISK_INTRSTATUS near *NPABRB_DISK_INTRSTATUS;
  454.  
  455. // InterruptStatus equates in ABRB_DISK_INTRSTATUS                        
  456.  
  457. #define NO_INTERRUPT            0x00    // No Interrupt                   
  458. #define INTERRUPT_PENDING       0x01    // Interrupt Pending              
  459.  
  460. // Set DMA Pacing            (Disk)       0x10 
  461.  
  462. typedef struct _ABRB_DISK_SETDMAPACING {  // AB2SDMA 
  463.  
  464.   ABRBH         abrbh;                  // 00H - Request Block Header      
  465.   UCHAR         DMAPacing;              // 10H - DMA Pacing value          
  466.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  467.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  468.   UCHAR         Undefined_2[16];        // 18H - Undefined                 
  469.   ULONG         WaitTime;               // 28H - Wait Time before resuming 
  470.  
  471. } ABRB_DISK_SETDMAPACING;
  472.  
  473. typedef ABRB_DISK_SETDMAPACING near *NPABRB_DISK_SETDMAPACING;
  474.  
  475. // Return DMA Pacing         (Disk)       0x11 
  476.  
  477. typedef struct _ABRB_DISK_RETDMAPACING { // AB2RDMA 
  478.  
  479.   ABRBH         abrbh;                  // 00H - Request Block Header      
  480.   UCHAR         DMAPacing;              // 10H - Current DMA pacing value  
  481.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  482.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  483.  
  484. } ABRB_DISK_RETDMAPACING;
  485.  
  486. typedef ABRB_DISK_RETDMAPACING near *NPABRB_DISK_RETDMAPACING;
  487.  
  488. #ifndef INCL_NO_SCB
  489.  
  490. //  Transfer SCB Request Block  (Disk)  0x12   
  491.  
  492. typedef struct _ABRB_DISK_XFERSCB  {    // AB2XSCB 
  493.  
  494.   ABRBH         abrbh;                  // 00H - Request Block Header       
  495.   ULONG         ppSCB;                  // 10H - physical pointer to SCB    
  496.   USHORT        Reserved_1;             // 14H - reserved, MBZ              
  497.   PSCBHDR       pSCBHdr;                // 16H - logical pointer to SCB hdr 
  498.   USHORT        Undefined_1;            // 1AH - Undefined                  
  499.   USHORT        Reserved_2;             // 1CH - reserved, MBZ              
  500.   PSCBHDR       pLastSCBHdr;            // 1EH - logical ptr to last SCB hdr
  501.   ULONG         Undefined_2;            // 22H - Undefined                  
  502.   USHORT        Reserved_3;             // 26H - reserved, MBZ              
  503.   ULONG         WaitTime;               // 28H - Wait time before resuming  
  504.   USHORT        Reserved_4;             // 2CH - reserved, MBZ              
  505.   UCHAR         Flags;                  // 2EH - bits 7-1 reserved          
  506.                                         // bit 0: 0-normal length SCB       
  507.                                         //        1-long SCB                
  508.   USHORT        SoftError;              // 2FH - Soft error word            
  509.   UCHAR         Undefined_3;            // 31H - Undefined                  
  510.   UCHAR         Status;                 // 32H - bits 7-1 reserved          
  511.                                         // bit 0: 0-last SCB field not valid
  512.                                         //        1-last SCB field valid    
  513.  
  514. } ABRB_DISK_XFERSCB;
  515.  
  516. typedef ABRB_DISK_XFERSCB near *NPABRB_DISK_XFERSCB;
  517.  
  518. #endif
  519.  
  520. //  Deallocate LID              (Disk)  0x14   
  521.  
  522. typedef struct _ABRB_DISK_DEALLOCLID {  // AB2DL 
  523.  
  524.   ABRBH         abrbh;                  // 00H - Request Block Header     
  525.   USHORT        Undefined_1;            // 10H - Undefined                
  526.   USHORT        SCSIdisknum;            // 12H - SCSI disk number         
  527.   USHORT        Undefined_2;            // 14H - Undefined                
  528.   USHORT        Reserved_1;             // 16H - Reserved, MBZ            
  529.  
  530. } ABRB_DISK_DEALLOCLID;
  531.  
  532. typedef ABRB_DISK_DEALLOCLID near *NPABRB_DISK_DEALLOCLID;
  533.  
  534. //  Get SCSI Parms              (Disk)  0x1A   
  535.  
  536. typedef struct _ABRB_DISK_GETSCSIPARMS { // AB2GSP 
  537.  
  538.   ABRBH         abrbh;                  // 00H - Request Block Header     
  539.   USHORT        Reserved_1;             // 10H - Reserved                 
  540.   UCHAR         PUN;                    // 12H - SCSI PUN                 
  541.   UCHAR         LUN;                    // 13H - SCSI LUN                 
  542.   UCHAR         LDN;                    // 14H - SCSI LDN                 
  543.   UCHAR         AdapterIndex;           // 15H - SCSI Adapter Index       
  544.   USHORT        Port;                   // 16H - SCSI base port address   
  545.  
  546. } ABRB_DISK_GETSCSIPARMS;
  547.  
  548. typedef ABRB_DISK_GETSCSIPARMS near *NPABRB_DISK_GETSCSIPARMS;
  549.  
  550. // Reset/Initialize Adapter           (SCSIA) 0x05  
  551.  
  552. typedef struct _ABRB_SCSIA_RESET_INIT  { // AB17RSET 
  553.  
  554.   ABRBH         abrbh;                  // 00H - Request Block Header      
  555.   UCHAR         ResetType;              // 10H - Reset type                
  556.   UCHAR         Undefined_1[5];         // 11H - Undefined                 
  557.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  558.   UCHAR         Undefined_2[16];        // 18H - Undefined fields          
  559.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  560.   UCHAR         Undefined_3[6];         // 2CH - Undefined                 
  561.   UCHAR         Status;                 // 32H - Status                    
  562.  
  563. } ABRB_SCSIA_RESET_INIT;
  564.  
  565. typedef ABRB_SCSIA_RESET_INIT near *NPABRB_SCSIA_RESET_INIT;
  566.  
  567. // Return Device Configuration Table  (SCSIA) 0x0B  
  568.  
  569. typedef struct _ABRB_SCSIA_RETDEVICECFGTBL { // AB17RDCT 
  570.  
  571.   ABRBH         abrbh;                  // 00H - Request Block Header     
  572.   USHORT        Reserved_1;             // 10H - Reserved                 
  573.   PBYTE         pDevCfgTbl;             // 12H - Logical ptr to table     
  574.   USHORT        Reserved_2;             // 16H - Reserved                 
  575.  
  576. } ABRB_SCSIA_RETDEVICECFGTBL;
  577.  
  578. typedef ABRB_SCSIA_RETDEVICECFGTBL near *NPABRB_SCSIA_RETDEVICECFGTBL;
  579.  
  580. // Return Interrupting Locical ID      (SCSIA) 0x0C 
  581.  
  582. typedef struct _ABRB_RETINTRLID { // AB17RIL 
  583.  
  584.   ABRBH         abrbh;                  // 00H - Request Block Header     
  585.   UCHAR         IntStatus;              // 10H - Interrupt status         
  586.   UCHAR         Undefined_1;            // 11H - Undefined                
  587.   USHORT        IntLID;                 // 12H - Interrupting LID         
  588.   USHORT        Undefined_2;            // 14H - Undefined                
  589.   USHORT        Reserved_1;             // 16H - Reserved                 
  590.  
  591. } ABRB_RETINTRLID;
  592.  
  593. typedef ABRB_RETINTRLID near *NPABRB_RETINTRLID;
  594.  
  595. // Use the same equates for IntStatus as those defined for Interrupt   
  596. // status in the Return Interrupt Status Disk ABIOS RB.                
  597.  
  598. // Read Device Parms                 (SCSIP)  0x03  
  599.  
  600. typedef struct _ABRB_SCSIP_READDEVPARMS  {   // AB18RDP 
  601.  
  602.   ABRBH         abrbh;                  // 00H - Request Block Header     
  603.   USHORT        Reserved_1;             // 10H - Reserved, MBZ            
  604.   UCHAR         SCB_Level;              // 12H - SCB compatibility level  
  605.   UCHAR         AdapterIndex;           // 13H - Adapter Index            
  606.   USHORT        DeviceFlags;            // 14H - Device Flags             
  607.   UCHAR         LUN;                    // 16H - Logical Unit Number      
  608.   UCHAR         PUN;                    // 17H - Physical Unit Number     
  609.   UCHAR         Undefined_1[16];        // 18H - Undefined fields         
  610.   USHORT        Reserved_2;             // 28H - Reserved, MBZ            
  611.  
  612. } ABRB_SCSIP_READDEVPARMS;
  613.  
  614. typedef ABRB_SCSIP_READDEVPARMS near *NPABRB_SCSIP_READDEVPARMS;
  615.  
  616. // DeviceFlags equates in ABRB_SCSIP_READDEVPARMS                         
  617.  
  618. #define DEVDEFECTIVE          0x0001    // device found defective by POST 
  619. #define POWEROFF              0x0002    // device is currently powered off
  620. #define CACHESUPPORT          0x0010    // Adpater card cache supported   
  621.  
  622. // Reset/Initialize                  (SCSIP)  0x05  
  623.  
  624. typedef struct _ABRB_SCSIP_RESET  {     // AB18RS 
  625.  
  626.   ABRBH         abrbh;                  // 00H - Request Block Header      
  627.   UCHAR         Undefined_1[6];         // 10H - Undefined                 
  628.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  629.   UCHAR         Undefined_2[16];        // 18H - Undefined fields          
  630.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  631.   UCHAR         Undefined_3[6];         // 2CH - Undefined                 
  632.   UCHAR         Status;                 // 32H - Status                    
  633.  
  634. } ABRB_SCSIP_RESET;
  635.  
  636. typedef ABRB_SCSIP_RESET near *NPABRB_SCSIP_RESET;
  637.  
  638. // Set Device Time-Out               (SCSIP)  0x10  
  639.  
  640. typedef struct _ABRB_SCSIP_SETTIMEOUT  {     // AB18STO 
  641.  
  642.   ABRBH         abrbh;                  // 00H - Request Block Header      
  643.   UCHAR         Timeout;                // 10H - Time-out value            
  644.   UCHAR         Reserved_1;             // 11H - Reserved, MBZ             
  645.   UCHAR         Undefined_1[4];         // 12H - Undefined                 
  646.   USHORT        Reserved_2;             // 16H - Reserved, MBZ             
  647.   UCHAR         Undefined_2[16];        // 18H - Undefined fields          
  648.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  649.   UCHAR         Undefined_3[6];         // 2CH - Undefined                 
  650.   UCHAR         Status;                 // 32H - Status                    
  651.  
  652. } ABRB_SCSIP_SETTIMEOUT;
  653.  
  654. typedef ABRB_SCSIP_SETTIMEOUT near *NPABRB_SCSIP_SETTIMEOUT;
  655.  
  656. // Read Device Time-Out              (SCSIP)  0x11  
  657.  
  658. typedef struct _ABRB_SCSIP_READTIMEOUT  {   // AB18RTO 
  659.  
  660.   ABRBH         abrbh;                  // 00H - Request Block Header      
  661.   UCHAR         Timeout;                // 10H - Time-out value            
  662.   UCHAR         Reserved_1;             // 11H - Reserved, MBZ             
  663.   UCHAR         Undefined_1[4];         // 12H - Undefined                 
  664.   USHORT        Reserved_2;             // 16H - Reserved, MBZ             
  665.  
  666. } ABRB_SCSIP_READTIMEOUT;
  667.  
  668. typedef ABRB_SCSIP_READTIMEOUT near *NPABRB_SCSIP_READTIMEOUT;
  669.  
  670. // Transfer SCB                      (SCSIP)  0x12  
  671.  
  672. typedef struct _ABRB_SCSIP_TRANSFERSCB { // AB18TSCB 
  673.  
  674.   ABRBH         abrbh;                  // 00H - Request Block Header       
  675.   ULONG         ppSCB;                  // 10H - physical pointer to SCB    
  676.   USHORT        Reserved_1;             // 14H - reserved, MBZ              
  677.   PSCBHDR       pSCBHdr;                // 16H - logical pointer to SCB hdr 
  678.   USHORT        Undefined_1;            // 1AH - Undefined                  
  679.   USHORT        Reserved_2;             // 1CH - reserved, MBZ              
  680.   UCHAR         Undefined_2[8];         // 1EH - Undefined                  
  681.   USHORT        Reserved_3;             // 26H - reserved, MBZ              
  682.   ULONG         WaitTime;               // 28H - Wait time before resuming  
  683.   USHORT        Reserved_4;             // 2CH - reserved, MBZ              
  684.   UCHAR         Flags;                  // 2EH - bits 7-1 reserved          
  685.                                         //       bit 0: 0-normal length SCB 
  686.                                         //              1-long SCB          
  687.   UCHAR         Undefined_3[3];         // 2FH - Undefined                  
  688.   UCHAR         Status;                 // 32H - bits 7-2 & 0 reserved      
  689.                                         //       bit 1: 0 - CCSB not reqrd  
  690.                                         //              1 - CCSB needed     
  691.  
  692. } ABRB_SCSIP_TRANSFERSCB;
  693.  
  694. typedef ABRB_SCSIP_TRANSFERSCB near *NPABRB_SCSIP_TRANSFERSCB;
  695.  
  696. #define  NORMAL_SCB  0x00               // Flags - Normal length SCB        
  697. #define  LONG_SCB    0x01               // Flags - Long SCB                 
  698.  
  699. #define  TSB_NOT_REQD   0x00            // Status - TSB is not needed       
  700. #define  TSB_NEEDED     0x02            // Status - TSB is needed           
  701.  
  702. // Deallocate SCSI Peripheral Device (SCSIP)  0x14  
  703.  
  704. typedef struct _ABRB_SCSIP_DEALLOC      {   // AB18DPD 
  705.  
  706.   ABRBH         abrbh;                  // 00H - Request Block Header      
  707.   UCHAR         Undefined_1[6];         // 10H - Undefined                 
  708.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  709.  
  710. } ABRB_SCSIP_DEALLOC;
  711.  
  712. typedef ABRB_SCSIP_DEALLOC  near *NPABRB_SCSIP_DEALLOC;
  713.  
  714. // Allocate SCSI Peripheral Device   (SCSIP)  0x15  
  715.  
  716. typedef struct _ABRB_SCSIP_ALLOC  {     // AB18APD 
  717.  
  718.   ABRBH         abrbh;                  // 00H - Request Block Header      
  719.   UCHAR         DevType;                // 10H - Device peripheral type    
  720.   UCHAR         DevFlags;               // 11H - Device type flags         
  721.   USHORT        DevUnit;                // 12H - nth device of this type   
  722.   USHORT        Undefined_1;            // 14H - Undefined                 
  723.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  724. } ABRB_SCSIP_ALLOC;
  725.  
  726. typedef ABRB_SCSIP_ALLOC near *NPABRB_SCSIP_ALLOC;
  727.  
  728. // DevFlags equates in RB_SCSIP_ALLOC                                   
  729.  
  730. #define DEVTYPE_CDROM           0x05
  731. #define DEVTYPE_REMOVABLE       0x80    // Device media is removable    
  732.  
  733. // Return Peripheral Type Count      (SCSIP)  0x16  
  734.  
  735. typedef struct _ABRB_SCSIP_RETCOUNT {   // AB18RC  
  736.  
  737.   ABRBH         abrbh;                  // 00H - Request Block Header      
  738.   UCHAR         DevType;                // 10H - Device Peripheral type    
  739.   UCHAR         DevFlags;               // 11H - Device type flags         
  740.   USHORT        Undefined_1;            // 12H - Undefined                 
  741.   USHORT        DevCount;               // 14H - Count of device type      
  742.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  743.  
  744. } ABRB_SCSIP_RETCOUNT;
  745.  
  746. typedef ABRB_SCSIP_RETCOUNT   near *NPABRB_SCSIP_RETCOUNT;
  747.  
  748. // Abort                             (SCSIP)  0x17  
  749.  
  750. typedef struct _ABRB_SCSIP_ABORT  {     // AB18AB 
  751.  
  752.   ABRBH         abrbh;                  // 00H - Request Block Header      
  753.   UCHAR         Undefined_1[6];         // 10H - Undefined                 
  754.   USHORT        Reserved_1;             // 16H - Reserved, MBZ             
  755.   UCHAR         Undefined_2[16];        // 18H - Undefined fields          
  756.   ULONG         WaitTime;               // 28H - Wait time before resuming 
  757.   UCHAR         Undefined_3[6];         // 2CH - Undefined                 
  758.   UCHAR         Status;                 // 32H - Status                    
  759.  
  760. } ABRB_SCSIP_ABORT;
  761.  
  762. typedef ABRB_SCSIP_ABORT near *NPABRB_SCSIP_ABORT;
  763.  
  764. #define GENERIC_ABRB_SIZE  128
  765.  
  766. // ABIOS Return Codes Common to all Functions 
  767.  
  768. #define ABRC_COMPLETEOK              0x0000
  769. #define ABRC_STAGEONINTERRUPT        0x0001
  770. #define ABRC_STAGEONTIME             0x0002
  771. #define ABRC_NOTMYINTERRUPT          0x0005
  772. #define ABRC_ATTENTION               0x0009
  773. #define ABRC_SPURIOUSINTERRUPT       0x0081
  774. #define ABRC_BUSY                    0x8000
  775. #define ABRC_START                   0xFFFF
  776.  
  777. #define ABRC_UNSUPPORTED_LID         0xC000
  778. #define ABRC_UNSUPPORTED_FUNCTION    0xC001
  779. #define ABRC_UNSUPPORRTED_UNIT       0xC003
  780. #define ABRC_UNSUPPORTED_RB_LEN      0xC004
  781. #define ABRC_INVALID_PARM            0xC005
  782.  
  783. #define ABRC_ERRORBIT                0x8000
  784. #define ABRC_RETRYBIT                0x0100
  785. #define ABRC_ERRORMSK                0x00FF
  786.  
  787. // ABIOS Return Codes Specific to Diskette - Device ID 0x01   
  788.  
  789. #define ABRC_DSKT_WRITE_PROTECT      0x8003
  790. #define ABRC_DSKT_MEDIA_CHANGED      0x8006
  791. #define ABRC_DSKT_MEDIA_NOT_PRESENT  0x800D
  792. #define ABRC_DSKT_NOCHGSIG           0x800E
  793. #define ABRC_DSKT_INVALID_VALUE      0x800F
  794. #define ABRC_DSKT_MEDIA_NOTSUPPORTED 0x8010
  795. #define ABRC_DSKT_NO_MEDIA_SENSE     0x8011
  796. #define ABRC_DSKT_RESET_FAIL         0x9009
  797. #define ABRC_DSKT_ADDRMARK_NOTFND    0x9102
  798. #define ABRC_DSKT_SECTOR_NOTFND      0x9104
  799. #define ABRC_DSKT_DMA_IN_PROGRESS    0x9107
  800. #define ABRC_DSKT_DMA_OVERRUN        0x9108
  801. #define ABRC_DSKT_BAD_CRC            0x9110
  802. #define ABRC_DSKT_BAD_CONTROLLER     0x9120   // A120,B020                 
  803. #define ABRC_DSKT_BAD_SEEK           0x9140
  804. #define ABRC_DSKT_GENERAL_ERROR      0x9180
  805. #define ABRC_DSKT_UNKNOWN_MEDIA      0xC00C
  806.  
  807. // ABIOS Return Codes Specific to Disk - Device ID 0x02   
  808.  
  809. #define ABRC_DISK_DEV_NOT_POWERED_ON 0x8001   //                           
  810. #define ABRC_DISK_DEV_BLOCK_INIT_ERR 0x8002   //                           
  811. #define ABRC_DISK_DEV_NOT_ALLOCATED  0x8003   //                           
  812. #define ABRC_DISK_DMA_ARB_INVALID    0x800F   //                           
  813. #define ABRC_DISK_BAD_COMMAND        0x9001   // 9101,A001,B001,B101       
  814. #define ABRC_DISK_ADDRMARK_NOTFND    0x9002   // 9102,A002                 
  815. #define ABRC_DISK_WRITE_PROTECT      0x9003   // 9103                      
  816. #define ABRC_DISK_RECORD_NOTFND      0x9004   // 9104,A004                 
  817. #define ABRC_DISK_RESET_FAIL         0x9005   // 9105,A005,A105            
  818. #define ABRC_DISK_MEDIA_CHANGED      0x9006   // 9106                      
  819. #define ABRC_DISK_CTRL_PARM_FAIL     0x9007   // 9107,A007,A107            
  820. #define ABRC_DISK_DMA_FAIL           0x9008   // 9108                      
  821. #define ABRC_DISK_DEFECTIVE_SECTOR   0x900A   //      A00A                 
  822. #define ABRC_DISK_BAD_TRACK          0x900B   //      A00B                 
  823. #define ABRC_DISK_FORMAT_ERROR       0x900D   //      A00D                 
  824. #define ABRC_DISK_CAM_RV             0x900E   //      A00E                 
  825. #define ABRC_DISK_CRC                0x9010   //      A010                 
  826. #define ABRC_DISK_DEVICE_FAILED      0x9014   // 9114                      
  827. #define ABRC_DISK_BUS_FAULT          0x9015   // 9115                      
  828. #define ABRC_DISK_BAD_CONTROLLER     0x9020   // 9120,A020,A120,B020,B120  
  829. #define ABRC_DISK_EQUIP_CHECK        0x9021   // 9121,A021,A121,B021,B121  
  830. #define ABRC_DISK_BAD_SEEK           0x9040   // 9140,A040,A140            
  831. #define ABRC_DISK_DEVICE_NORESPONSE  0x9080   // 9180,A080,A180,B080,B180  
  832. #define ABRC_DISK_DRIVE_NOTREADY     0x90AA   // 91AA,A0AA,A1AA            
  833. #define ABRC_DISK_UNDEFINED_ERROR    0x90BB   // 91BB,A0BB,A1BB,B0BB,B1BB  
  834. #define ABRC_DISK_WRITE_FAULT        0x90CC   // 91CC,A0CC,A1CC            
  835. #define ABRC_DISK_STATUS_ERROR       0x90E0   // 91E0                      
  836. #define ABRC_DISK_INCOMPLETE_SENSE   0x90FF   // 91FF,A0FF,A1FF,B0FF,B1FF  
  837. #define ABRC_DISK_ECC_CORRECTED      0xA011   //                           
  838.  
  839. // Various diskette equates                                     
  840.  
  841. // Equates specific to NEC Diskette Controller                              
  842.  
  843. #define ABNEC                        0020     // Level of NEC Controller    
  844. #define NEC_DSKT_READ                0xE6
  845. #define NEC_DSKT_WRITE               0xC5
  846. #define NEC_DSKT_FORMAT              0x4D
  847.  
  848. // Other various diskette equates                                           
  849.  
  850. #define ABDISKETTELID                0x0001
  851. #define HW_CHANGELINE_ACTIVE         0x80
  852. #define ABCHGLINEACTIVE              0x00FC
  853.  
  854.  
  855. //**************************************************************
  856. // Various Fixed Disk Equates                                   
  857. //**************************************************************
  858. #define ABRB_NOCACHE                 0x01  // ABRB_Flags bit 0, set=dont cache
  859. #define ABRETRYCOUNT                 0x05  // Device Error Retry Limit        
  860.  
  861.  
  862. //*****************************
  863. // ABIOS Device IDs            
  864. //*****************************
  865.  
  866. #define DEVID_INTERNAL          0x00
  867. #define DEVID_DISKETTE          0x01
  868. #define DEVID_DISK              0x02
  869. #define DEVID_VIDEO             0x03
  870. #define DEVID_KEYBOARD          0x04
  871. #define DEVID_PARALLEL          0x05
  872. #define DEVID_ASYNC             0x06
  873. #define DEVID_SYSTEMTIMER       0x07
  874. #define DEVID_RTC               0x08
  875. #define DEVID_SYSTEMSVCS        0x09
  876. #define DEVID_NMI               0x0A
  877. #define DEVID_MOUSE             0x0B
  878. #define DEVID_NVRAM             0x0E
  879. #define DEVID_DMA               0x0F
  880. #define DEVID_POS               0x10
  881. #define DEVID_SECURITY          0x16
  882. #define DEVID_SCSIADAPTER       0x17
  883. #define DEVID_GENERICSCSI       0x18
  884.