qdosmsq:traps:trap_1:srtc

MT_SCLCK/SMS_SRTC and MT_ACLCK/SMS_ARTC

The trap MT_SCLCK/SMS_SRTC sets the clock while the trap MT_ACLCK/SMS_ARTC adjusts the clock.

Call ParametersReturn Parameters
D0.B$14 or $15D0.LCorrupted?
D1.LTime in seconds. D1.LTime in seconds.
D2.L D2.LCorrupted.
D3.L D3.LCorrupted.
A0.L A0.LCorrupted.

No errors are returned by this trap.

  • All registers not shown above are not used on entry and are preserved on exit.
  • D0.B is $14 for MT_SCLCK/SMS_SRTC and $15 for MT_ACLCK/SMS_ARTC.
  • D1.L contains the signed adjustment in seconds for MT_SCLCK/SMS_SRTC and the number of seconds since 00:00 1st January 1961 for MT_ACLCK/SMS_ARTC.
  • On return D1.L contains the adjusted time in seconds since 00:00 1st January 1961.

The example below shows the use of this trap call to add 1 hour to the clock.

adj_1h  move.l  #60*60,d1       ; The number of seconds in 1 hour.
        moveq   #MT_ACLCK,d0    ; Adjust the clock.
        trap    #1              ; The later time in now in D1.L.
  • qdosmsq/traps/trap_1/srtc.txt
  • Last modified: 2009/02/25 18:14
  • by george.gwilt