qdosmsq:vectors:ildat

Differences

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

Link to this comparison view

qdosmsq:vectors:ildat [2009/02/25 15:53]
george.gwilt created
qdosmsq:vectors:ildat [2009/02/25 16:22] (current)
george.gwilt Link added
Line 1: Line 1:
 +====== CN_DATE/CV_ILDAT & CN_DAY/CV_ILDAY - Vectors $EC & $EE ======
 +
 +These vectors set an ASCII string for date (CN_DATE/CV_ILDAT) and day (CN_DAY/CV_DAY).
 +
 +^Call Parameters^^Return Parameters^^
 +|D0.L|Unused|D0.L|Corrupted?.|
 +|D1.L|Date (internal value). |D1.L|Preserved.|
 +|A1.L|Pointer to maths stack. |A1.L|Updated.|
 +
 +
 +===== Errors =====
 +No errors are returned by this vector call.
 +
 +
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * A1 points to the maths stack relative to A6.
 +  * On return (A1,A6.L) points to the ASCII string created by the vectors. The string is in the normal form of a word giving the length followed by the ASCII characters.
 +  * The date is returned in the form //yyyy mmmm dd hh:mm:ss//.
 +  * The day is returned as a three letter day of the week.
 +  * CN_DATE/CV_ILDAT requires at least 22 bytes on the stack. CN_DAY/CV_ILDAY requires at least 6 bytes.
 +
 +===== Example =====
 +The example below shows the use of these vectors to set the date followed by the day. We suppose that A6.L points to the data space.
 +The example uses the trap #1 routine [[qdosmsq:traps:trap_1:rrtc|MT_RCLCK]].
 +
 +<code>
 +mst     equ     30+6            ; Space for date and day.
 +
 +Get_dte moveq   #MT_RCLCK,d0    ; To read the clock.
 +        trap    #1              ; D1.L contains the date.
 +        lea     mst,a1          ; End of stack.
 +        movea.w CN_DAY,a2       ; CN_DAY vector address.
 + jsr (a2) ; ASCII day at (A1,A6.L)
 + movea.w CN_DATE,a2      ; CN_DATE vector address.
 + jsr (a2) ; ASCII date at (A1,A6.L)
 +        lea     (a1,a6.l),a4    ; Set the address of "date" to A4
 +
 +
 +</code>
 +
  
  • qdosmsq/vectors/ildat.txt
  • Last modified: 2009/02/25 16:22
  • by george.gwilt