qdosmsq:traps:trap_1:srtc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_1:srtc [2009/02/25 18:14] (current)
george.gwilt created
Line 1: Line 1:
 +====== 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 Parameters^^Return Parameters^^
 +|D0.B|$14 or $15|D0.L|Corrupted?|
 +|D1.L|Time in seconds. |D1.L|Time in seconds.|
 +|D2.L| |D2.L|Corrupted.|
 +|D3.L| |D3.L|Corrupted.|
 +|A0.L| |A0.L|Corrupted.|
 +
 +===== Errors =====
 +No errors are returned by this trap.
 +
 +
 +
 +===== Notes =====
 +  * 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. 
 +
 +===== Example =====
 +The example below shows the use of this trap call to add 1 hour to the clock.
 +<code>
 +
 +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.
 +
 +</code>
 +
  
  • qdosmsq/traps/trap_1/srtc.txt
  • Last modified: 2009/02/25 18:14
  • by george.gwilt