INT 21 - Advanced SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. Programming Interface (ASPI) - INTERFACE
AX = 4402h
BX = file handle for device "SCSIMGR$"
CX = 0004h or 0005h (refer to notes below)
DS:DX -> buffer for result (see #01452), set to zeros before call
Return: CF clear if successful
AX = 0004h or 0005h (refer to notes below)
CF set on error
AX = error code (01h,05h,06h,0Dh) (see #01680 at AH=59h/BX=0000h)
Notes: the variant of the call requesting five bytes is an UNDOCUMENTED
extension supported by Adaptec's ASPI2DOS.SYS, ASPI4DOS.SYS, and
ASPI7DOS.SYS; if made of a host manager which does not support the
variant, only four bytes will be returned. If the variant is
supported, Adaptec's WINASPI.DLLsee Dynamic Link Library assumes that the host manager is
an "advanced" one which operates in either real or protected mode
(and thus does not require a DPMIsee DOS Protected-Mode Interface INT 31/AX=0301h call to be invoked
from protected mode). Support of the five-byte variant also appears
to imply that an advanced ASPI host manager uses no temporary
storage space except the SRB (see #01454) and the stack, and that it
is fully reentrant.
if called with a standard request for four bytes, even Adaptec's
advanced drivers return only the requested four bytes containing the
ASPI entry point address
the function address is called with the address of a SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. Request
Block (see #01454) on the stack and the caller must clean up the
stack
SeeAlso: AX=440Ch"ASPITAPE",INT 11/AH=FFh"WD7000"
Format of ASPI IOCTL result:
Offset Size Description (Table 01452)
00h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. function address
04h BYTE number of SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. host adapters supported by host manager
(Table 01453)
Values for ASPI request number:
00h "HA_INQ" host adapter inquiry / extended host adapter inquiry
01h "GET_TYPE" get device type
02h "EXEC_SIO" execute SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. I/O
03h "ABORT_SRB" abort SRB
04h "RESET_DEV" reset SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. device
05h "SET_HAPRMS" set host adapter parameters
06h get disk drive information
7Fh (Adaptec) get ASPI manager info?
Note: request 7Fh is supported by all the Adaptec's DOS ASPI managers:
ASPI2DOS.SYS (for AHA-152x), ASPI4DOS.SYS (for AHA-154x/164x),
ASPI7DOS.SYS (for AIC-77xx), and ASPI8DOS.SYS (for AIC-78xx)
Format of SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. Request Block (64 bytes):
Offset Size Description (Table 01454)
00h BYTE request number (see #01453)
01h BYTE request status (see #01455)
02h BYTE host adapter ID
03h BYTE request flags (see #01456)
04h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. reserved (0)
---request 00h---
08h BYTE (ret) number of host adapters
09h BYTE (ret) target adapter ID
0Ah 16 BYTEs (ret) SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. manager ID
1Ah 16 BYTEs (ret) host adapter ID
2Ah 16 BYTEs (ret) host adapter-unique parameters (see #90010,#90011)
---extended request 00h---
04h 2 BYTEs (call) extended request signature 55h AAh
(ret) if extended request supported, reply AAh 55h
06h WORD (call) length of extended buffer at offset 3Ah
(ret) number of bytes returned in extended buffer
08h BYTE (ret) number of host adapters
09h BYTE (ret) target adapter ID
0Ah 16 BYTEs (ret) SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. manager ID
1Ah 16 BYTEs (ret) host adapter ID
2Ah 16 BYTEs (ret) host adapter-unique parameters
3Ah N BYTEs extended buffer
3Ah WORD features (see #01457)
3Ch WORD maximum scatter/gather list length
3Eh DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. maximum SCIS data transfer size (0 = unlimited)
---request 01h---
08h BYTE target ID
09h BYTE logical unit number
0Ah BYTE (ret) device type (see #01460)
---request 02h---
08h BYTE target ID
09h BYTE logical unit number
0Ah DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. data allocation length
(ret) residual byte length (if supported and requested)
0Eh BYTE sense allocation length
0Fh DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. data buffer pointer
13h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. next request pointer (for linking)
17h BYTE CDB length
18h BYTE (ret) host adapter status (see #01454)
19h BYTE (ret) target status (see #01459)
1Ah DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. post routine address (see #01466)
1Eh WORD real mode Post DS
20h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. SRB pointer
24h WORD reserved
26h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. SRB physical address
2Ah 22 BYTEs SCSIMGR$ workspace
40h N BYTEs CCB, including sense data (20-24 bytes)
---request 03h---
08h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. address of SRB to abort
---request 04h---
08h BYTE target ID
09h BYTE logical unit number
0Ah 14 BYTEs reserved
18h BYTE (ret) host adapter status (see #01458)
19h BYTE (ret) target status (see #01459)
1Ah DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. post routine address
1Eh 34 BYTEs workspace
---request 05h---
08h 16 BYTEs host adapter-unique parameters
---request 06h---
08h BYTE target ID
09h BYTE logical unit number
0Ah BYTE disk drive flags (see #01461)
0Bh BYTE INT 13h drive number
0Ch BYTE preferred head number translation
0Dh BYTE preferred sector size translation
0Eh 10 BYTEs reserved
---request 7Fh---
08h WORD base I/O port address
0Ah BYTE number of I/O ports used
0Bh BYTE ??? (01h returned for AHA-152x)
0Ch BYTE interrupt level
0Dh BYTE DMAsee Direct Memory Access channel
0Eh BYTE (ASPI7DOS.SYS) EISA(Enhanced Industry-Standard Architecture) A 32-bit superset of the IBMInternational Busiuness Machines ATIBM PC AT's expansion bus (which is now known as the ISA or Industry-Standard Architecture bus). slot number
(ASPI8DOS.SYS) PCI device number
0Fh BYTE bits 7-1: reserved (0)
bit 0: (AHA-152x) ???
10h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. ASPI entry point address
14h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. previous ASPI entry point address
18h WORD offset to "ASPI request dispatcher" procedure
1Ah WORD offset to "interrupt handler" procedure
1Ch WORD offset to some procedure
1Eh WORD offset to some procedure
20h WORD offset to host adapter data
22h BYTE ??? (apparently always 02h)
23h BYTE reserved??? (0)
24h BYTE (ASPI8DOS.SYS) PCI bus number?
25h 11 BYTEs reserved??? (0)
SeeAlso: #01462
(Table 01455)
Values for ASPI request status:
00h not done yet
01h completed successfully
02h aborted by host
04h SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. I/O error
80h invalid
81h no adapter
82h no device attached
else status
SeeAlso: #01454
Bitfields for ASPI request flags:
Bit(s) Description (Table 01456)
0 posting enabled
1 linking enabled
2 residual byte length reported in Data Allocation Length field
3 transfer from SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. target to host
4 transfer from host to SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. target
5 scatter/gather
7-6 reserved
Note: no data is transferred if both bits 3 and 4 are set; if neither is
set, the direction is determined by the SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. command
SeeAlso: #01454
Bitfields for ASPI extended features:
Bit(s) Description (Table 01457)
0 scatter/gather supported
1 residual byte length reported
2 Wide SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. 16 host adapter
3 Wide SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. 32 host adapter
15-4 reserved
SeeAlso: #01454
(Table 01458)
Values for host adapter status:
00h no error detected
11h select timeout
12h data overrun
13h bus error
14h bus failure
(Table 01459)
Values for target status:
00h no status
02h sense data stored in SRB
08h target busy
18h reservation error
(Table 01460)
Values for device type:
00h disk drive
01h tape drive (streamer)
02h printer
03h processor
04h WORM drive
05h CD-ROM drive
06h scanner
07h optical drive
08h autochanger
09h communications device
(Table 01461)
Values for disk drive flags:
00h no INT 13 access
01h INT 13 with DOS access
02h INT 13 without DOS access
03h invalid flags
Format of CCB:
Offset Size Description (Table 01462)
00h BYTE command code (see #01463)
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 #01464)
SeeAlso: #01454
(Table 01463)
Values for CCB command code:
00h test unit ready
01h rewind
03h request sense data
05h get block size limits
08h Group 0 read
0Ah Group 0 write
10h write file marks
11h SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. Space (set position?)
12h SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. Inquire
15h set mode information
16h reserve SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. device
17h release SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. device
19h erase
1Ah request mode information
1Bh load/unload media
1Dh request target self-check
24h set window parameters
25h get window parameters
28h Group 1 read
2Ah Group 1 write
31h document feeder control
34h get scan data status
---vendor-specific commands---
D3h get document feeder status
D4h set document feeder mode
Format of sense data:
Offset Size Description (Table 01464)
00h BYTE error code (bit 7 set if valid)
01h BYTE segment number
02h BYTE sense key
bit 6: EOM
bit 5: ILI
bits 0-3: sense key (see #01465)
03h 4 BYTEs information bytes
07h BYTE additional sense length (0Ah)
08h 4 BYTEs command-specific information
0Ch BYTE additional sense code
0Dh BYTE additional sense code qualifier
0Eh BYTE field replaceable unit code
0Fh 3 BYTEs sense key specific bytes
(Table 01465)
Values for sense key:
00h no sense data
02h SCSI(Small Computer Systems Interface) A system-independent expansion bus typically used to connect hard disks, tape drives, and CD-ROMs to a computer. A host adapter connects the SCSI bus to the computer's own bus. See also ESDI, IDE. unit not ready
03h media error
04h unrecoverable hardware error
05h illegal parameter in CDB
06h target has been reset
0Bh target aborted command
(Table 01466)
Values ASPI post function is called with:
STACK: DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. -> SRB (see #01454) which completed
interrupts disabled
Return: EBP, EBX, ESI, EDI must be preserved
interrupts disabled
Note: the post function may issue any ASPI function except an abort; it
should complete as quickly as possible
Format of ASPI2DOS.SYS v3.65 host adapter unique parameters:
Offset Size Description (Table 90010)
00h WORD reserved? (0)
02h WORD reserved? (0)
04h WORD base I/O port address
06h BYTE interrupt level
07h 9 BYTEs reserved (0)
SeeAlso: #90011,#01454
Format of ASPI4DOS.SYS v3.35 host adapter unique parameters:
Offset Size Description (Table 90011)
00h WORD offset to "ASPI request dispatcher" procedure
02h WORD offset to "interrupt handler" procedure
04h 12 BYTEs reserved (0)
SeeAlso: #90010,#01454