QDOS Internals

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

User Tools

Site Tools


Table of Contents


This trap reads or sets a file's date.

Call ParametersReturn Parameters
D0.B$4CD0.LError code.
D1.LSet/read key.D1.LDate.
D2.BType date key.D2.LPreserved.
A0.LChannel ID.A0.LPreserved.


Any IOSS errors.


  • All registers not shown above are not used on entry and are preserved on exit.
  • The value in D1.L should be one of:
    • -1 to read the date and set it in D1.
    • 0 to set the date to the current date.
    • value to set the date to 'value'.
  • D2.B should be set 0 for the update date and 2 for the backup date.
  • If the update date has been set by this trap it will not be reset when the file is closed.
  • The backup date can be altered even if the file has been opened for read only since that date is not stored in the file itself.


The example below shows the use of this trap call to read a file's backup date. It is assumed that the channel ID is in A0.L.

        moveq   #$4C,d0         ; IOF_DATE
        moveq   #-1,d1          ; Read date
        moveq   #2,d2           ; Backup date
        moveq   #-1,d3          ; Timeout
        trap    #3              ; Get the backup date to D1.L
        tst.l   d0              ; OK? . .
        bne.s   oops            ; . . NO!

        ...                     ; Do something here.
qdosmsq/traps/trap_3/date.txt · Last modified: 2010/10/30 15:09 by george.gwilt