INT 21 - Advanced SCSI Programming Interface (ASPI) - INTERFACE
AX = 4402h
BX = file handle for device "SCSIMGR$"
CX = 0004h
DS:DX -> buffer for function address
Return: CF clear if successful
AX = 0004h
CF set on error
AX = error code (01h,05h,06h,0Dh) (see AH=59h)
Note:   the function address is called with the address of a SCSI Request
Block on the stack and the caller must clean up the stack
SeeAlso: INT 11/AH=FFh"WD7000"

Format of SCSI Request Block (64 bytes):
Offset  Size    Description
00h    BYTE    request number
00h "HA_INQ"     host adapter inquiry
01h "GET_TYPE"   get device type
02h "EXEC_SIO"   execute SCSI I/O
03h "ABORT_SRB"  abort SRB
04h "RESET_DEV"  reset SCSI device
05h "SET_HAPRMS" set host adapter parameters
01h    BYTE    request status
00h not done yet
02h aborted
04h SCSI I/O error
80h invalid
81h no adapter
82h no device attached
else status
02h    BYTE    host adapter ID
03h    BYTE    request flags
bit 3: ???
04h    DWORD   reserved
---request 00h---
08h    BYTE    (returned) number of host adapters
09h    BYTE    (returned) target adapter ID
0Ah 16 BYTEs   (returned) manager ID
1Ah 16 BYTEs   (returned) adapter ID
2Ah 16 BYTEs   (returned) parameters
---request 01h---
08h    BYTE    target ID
09h    BYTE    logical unit number
0Ah    BYTE    (returned) device type
01h streamer
---request 02h---
08h    BYTE    target ID
09h    BYTE    logical unit number
0Ah    DWORD   data allocation length
0Eh    BYTE    sense allocation length
0Fh    DWORD   data buffer pointer
13h    DWORD   next request pointer (for linking)
17h    BYTE    CDB length
18h    BYTE    (returned) host adapter status
11h select timeout
12h data overrun
13h bus error
14h bus failure
19h    BYTE    (returned) target status
02h sense data stored in SRB
08h target busy
18h reservation error
1Ah    DWORD   post routine address
1Eh    WORD    real mode Post DS
20h    DWORD   SRB pointer
24h    WORD    reserved
26h    DWORD   SRB physical address
2Ah 22 BYTEs   SCSIMGR$ workspace
40h  N BYTEs   CCB (20-24 bytes)
---request 04h---
08h    BYTE    target ID
09h    BYTE    logical unit number
0Ah 14 BYTEs   reserved
18h    BYTE    (returned) host adapter status (see above)
19h    BYTE    (returned) target status (see above)
1Ah    DWORD   post routine address
1Eh 34 BYTEs   workspace

Format of CCB:
Offset  Size    Description
00h    BYTE    command code
01h rewind
05h get block size limits
08h read
0Ah write
10h write file marks
11h SCSI Space (set position?)
12h SCSI Inquire
19h erase
1Bh load/unload media
01h    BYTE    flags
bits 4-0: vary by function
bits 7-5: logical unit number
02h    BYTE    "adr_1"
03h    BYTE    "adr_0"
04h    BYTE    length
05h    BYTE    control
...
06h/0Ah 14 BYTEs buffer for sense data

See also: 21440C

214402 - Advanced SCSI Programming Interface (ASPI) - INTERFACE