annotate level2/modules/kernel/fstime.asm @ 1145:ca83286ded5b

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