h6. [[ADFS]] h6(. » [[ADFS SWI Calls|SWI Calls]] h6((. » ADFS_ATAPIOp h2. ADFS_ATAPIOp h5. (SWI &40255) |_<^{width:4em}. Entry | | |<^. R0 |<^. bit 0 set => reset controller | |<^. |<^. bit 0 clear => process command; other bits then act as below | |<^. |<^. bits 12-15 = device ID (prior to ADFS 4.00, only device IDs 0 and 8 were valid, corresponding to master and slave PATA devices) | |<^. |<^. bits 16-23 = controller/port ID | |<^. |<^. bits 24-25 = transfer direction: | |<^. |<^. 00 => no transfer | |<^. |<^. 01 => read (ie bit 24 set) | |<^. |<^. 10 => write (ie bit 25 set) | |<^. |<^. 11 reserved | |<^. |<^. bit 26 set => data transfer uses multiword DMA or UDMA from device's perspective (note that the host controller may actually use bus mastering even for PIO transfers) (since ADFS 4.00) | |<^. |<^. bit 27 set => device requires DMADIR indicator in Features task file register (determine this using IDENTIFY PACKET DEVICE) (since ADFS 4.00) | |<^. R1 |<^. length of "Control block":#control - must be 12 or 16 (prior to ADFS 4.00, must be 12) | |<^. R2 |<^. pointer to "Control block":#control | |<^. R3 |<^. pointer to buffer | |<^. R4 |<^. length to transfer | |<^. R5 |<^. timeout in centiseconds (0 => use default, currently 10 seconds) | |_<^{width:4em}. Exit | | |<^. R0 |<^. 0 if successful, or a disc error number (with V flag clear) | |<^. R1 |<^. Preserved? | |<^. R2 |<^. Preserved? The "Control block":#control is *not* updated| |<^. R3 |<^. Pointer to first byte not transferred | |<^. R4 |<^. Length not transferred | |<^. R5 |<^. Corrupted | h4(#control). Control block (12 byte format) |_<^{width:4em}. Offset |_<^{width:8em}. Description | |<^. +0 | Operation code | |<^. +1 | Service action | |<^. +2 | 32-bit LBA | |<^. +6 | 32-bit Length | |<^. +10 | Reserved | |<^. +11 | Control | h4. Use The purpose of this call is to perform ATA operations on ADFS attached devices. h4. Notes This SWI was first present in ADFS 3.34 (RISC OS 5.02) h4. See also * [[ADFS]] * [[FileCore]]