1145
|
1 **************************************************
|
|
2 * System Call: F$STime
|
|
3 *
|
|
4 * Function: Set system time
|
|
5 *
|
|
6 * Input: X = Address of time packet:
|
|
7 *
|
|
8 * Offset 0 = Year
|
|
9 * Offset 1 = Month
|
|
10 * Offset 2 = Day
|
|
11 * Offset 3 = Hour
|
|
12 * Offset 4 = Minute
|
|
13 * Offset 5 = Second
|
|
14 *
|
|
15 * Output: System time/date set
|
|
16 *
|
|
17 * Error: CC = C bit set; B = error code
|
|
18 *
|
|
19 FSTime ldx R$X,u Get address that user wants time packet
|
|
20 *** tfr dp,a Set MSB of D to direct page
|
|
21 *** ldb #D.Time Offset to Time packet in direct page
|
|
22 *** tfr d,u Point U to it
|
|
23 ldu #D.Time --- DP=0 always
|
|
24 ldy <D.Proc Get ptr to process that called us
|
|
25 lda P$Task,y Get task # from process
|
|
26 ldb <D.SysTsk Get task # of system process
|
|
27 ldy #6 6 byte packet to move
|
|
28 os9 F$Move Go move it
|
|
29 ldx <D.Proc Get ptr to process that called us
|
|
30 pshs x Preserve it
|
|
31 ldx <D.SysPrc Get ptr to system process
|
|
32 stx <D.Proc Save as current process
|
1783
|
33 lda #Systm+Objct Link to Clock module
|
|
34 leax ClockNam,pc
|
1145
|
35 os9 F$Link
|
|
36 puls x Get back ptr to user's process
|
|
37 stx <D.Proc Make it the active process again
|
1783
|
38 bcs ex@ If error in Link, exit with error code
|
1145
|
39 jmp ,y Jump into Clock
|
1783
|
40 ex@ rts
|
1145
|
41
|
1783
|
42 ClockNam fcs /Clock/
|
1145
|
43
|