qdosmsq:traps:trap_3:xinf

IOF_XINF

This trap returns extended filing system information.

Call ParametersReturn Parameters
D0.B$4FD0.LError return.
D1.L0D1.LPreserved.
D3.WTimeout D2.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.LAddress of bufferA1.LPreserved.

Any I/O subsystem errors including

ERR_NCNot complete.
  • 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).
MnemonicAddressLengthItem
IOI_NAME$00StringUp to 20 characters medium name (null filled)
IOI_DNAM$16StringUp to 4 characters device name (eg WIN)
IOI_DNUM$1CByteDrive number
IOI_RDON$1DByteNon zero if read only
IOI_ALLC$1EWordAllocation unit size (bytes)
IOI_TOTL$20LongTotal medium size (in allocation units)
IOI_FREE$24LongFree space on medium (in allocation units}
IOI_HDRL$28LongFile header length (per file storage overhead)
IOI_FTYP$2CByteFormat type (1=QDOS,2=MSDOS etc)
IOI_STYP$2DByteFormat sub-type
IOI_DENS$2EByteMedium type (0=RAM,1=FLP,2=HD,3=CD)
IOI_REMV$30ByteSet if removable
IOI_XXXX$31$0F bytesSet to -1

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!
  • qdosmsq/traps/trap_3/xinf.txt
  • Last modified: 2009/06/01 10:49
  • by george.gwilt