QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools



This trap returns information about the medium.

Call ParametersReturn Parameters
D0.B$45D0.LError return.
D1.L D1.LEmpty/Good sectors.
D3.WTimeout D3.LPreserved.
A0.LChannel ID A0.LPreserved.
A1.LAddress of bufferA1.LEnd of medium name.


ERR_NCNot complete.
ERR_NOChannel not open.


  • All registers not shown above are not used on entry and are preserved on exit.
  • The channel ID in A0 must belong either to a file on the medium or to its directory.
  • The msw of D1 will contain the number of empty 512 byte sectors on the medium. The number in D1.W is the total number of sectors available.
  • The buffer whose address is given in A1.L must be 10 bytes long. This will contain the medium name left justified and padded to the right with the space character ($20).


The example below shows the use of this trap. It is assumed that A0 contains the ID either of a file on the medium or of its directory. Also it is assumed that buf(A6) is the address of a 10-byte buffer.

info    moveq   #fs_mdinf,d0    ; $45
        moveq   #-1,d3          ; Timeout
        lea     buf(a6),a1      ; A 10-byte buffer
        trap    #3              ; Get the information
        tst.l   d0              ; OK? . .
        bne     error           ; . . no!
qdosmsq/traps/trap_3/minf.txt · Last modified: 2009/05/19 16:53 by george.gwilt