Showing changes from revision #2 to #3:
Added | Removed | Changed
Entry | |
---|---|
R0 | Flag bits |
R2 | Pointer to Parameter block for command and results |
R3 | Pointer to buffer |
R4 | Length to transfer |
R5 | Timeout in centiseconds (if 0 is passed then use the default value) |
R12 | Pointer to static workspace |
Exit | |
---|---|
R0 | Command status (0 or a disc error number) |
R2 | Preserved |
R3 | Preserved |
R4 | Updated |
R5 | Corrupted |
0 | 0 = process command |
1 = reset controller | |
3 | 1 = parameter block pointed to by R2 is 11 bytes long (new in ADFS 3.34 / RISC OS 5.02) |
12 – 15 | device ID (since ADFS 4.00) |
16 – 23 | controller/port ID (since ADFS 3.34 / RISC OS 5.02) |
24 – 25 | 00 = no transfer |
01 = read (bit 24 set) | |
10 = write (bit 25 set) | |
11 = reserved |
26 | 1 = 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 3.34 / RISC OS 5.02) |
Original form (R0 bit 3 clear):CHS/28-bit LBA form (R0 bit 3 clear):
+0 | Features/Error |
+1 | Sector Count |
+2 | LBA |
+3 | LBA |
+4 | LBA |
+5 | |
bits 0-3 – LBA bits 24-27/Head | |
bit 4 – 0=master, 1=slave | |
bit 6 – 0=CHS mode, 1=LBA mode | |
+6 | Command/Status |
48-bit LBA form (R0 bit 3 set, since ADFS 3.34 / RISC OS 5.02):
+0 | Features/Error |
+1 | 16-bit Sector Count |
+3 | 48-bit LBA |
+9 | |
bit 4 – 0=master, 1=slave | |
bit 6 – 0=CHS mode, 1=LBA mode | |
+10 | Command/Status |
Since ADFS 4.00, the use of bit 4 of the Device byte of the parameter block to select between devices on the same controller/port is deprecated (even for PATA controllers; PATADriver will substitute the device number into the Device byte prior to transmission for you). Use bits 12-15 of R0 instead. Also since ADFS 4.00, the parameter block is no longer updated if R0 bit 0 was set on entry.
The purpose of this call is to access low-level IDE commands.
This call must not be called in the background.