IOF_XINF
This trap returns extended filing system information.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $4F | D0.L | Error return. |
D1.L | 0 | D1.L | Preserved. |
D3.W | Timeout | D2.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | Address of buffer | A1.L | Preserved. |
Errors
Any I/O subsystem errors including
ERR_NC | Not complete. |
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- A1.L must point to a 64-byte buffer.
- This trap is supported on Level 2 device drivers and should be called to find out whether the current device is Level 2 or not. If this trap succeeds all other filing system traps will be available.
- The format of the information in the buffer is given below.
- The number of allocation units needed to store a file is:
- (file + header length +alloc unit size -1)/(alloc unit size).
Extended Information
Mnemonic | Address | Length | Item |
---|---|---|---|
IOI_NAME | $00 | String | Up to 20 characters medium name (null filled) |
IOI_DNAM | $16 | String | Up to 4 characters device name (eg WIN) |
IOI_DNUM | $1C | Byte | Drive number |
IOI_RDON | $1D | Byte | Non zero if read only |
IOI_ALLC | $1E | Word | Allocation unit size (bytes) |
IOI_TOTL | $20 | Long | Total medium size (in allocation units) |
IOI_FREE | $24 | Long | Free space on medium (in allocation units} |
IOI_HDRL | $28 | Long | File header length (per file storage overhead) |
IOI_FTYP | $2C | Byte | Format type (1=QDOS,2=MSDOS etc) |
IOI_STYP | $2D | Byte | Format sub-type |
IOI_DENS | $2E | Byte | Medium type (0=RAM,1=FLP,2=HD,3=CD) |
IOI_REMV | $30 | Byte | Set if removable |
IOI_XXXX | $31 | $0F bytes | Set to -1 |
Example
The example below shows the use of this trap call. It is assumed that the channel ID is held at id(A6) and that buf(A6) is the address of a 64-byte buffer.
info moveq #iof_xinf,d0 ; $4F moveq #-1,d3 ; Timeout moveq #0,d1 ; D1 must be zero movea.l id(a6),a0 ; Set Channel ID lea buf(a6),a1 ; Set address of 64 byte buffer trap #3 ; Get information tst.l d0 ; OK? . . bne error ; . . no!