annotate level2/modules/kernel/fstime.asm @ 1919:028161cd3535

uses ss.fd
author boisy
date Fri, 25 Nov 2005 12:39:54 +0000 (2005-11-25)
parents 884c56f17214
children 039ddb7c8ad7
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
1783
884c56f17214 Minor source changes for clarity -- no code changes
boisy
parents: 1145
diff changeset
33 lda #Systm+Objct Link to Clock module
884c56f17214 Minor source changes for clarity -- no code changes
boisy
parents: 1145
diff changeset
34 leax ClockNam,pc
1145
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
1783
884c56f17214 Minor source changes for clarity -- no code changes
boisy
parents: 1145
diff changeset
38 bcs ex@ If error in Link, exit with error code
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
39 jmp ,y Jump into Clock
1783
884c56f17214 Minor source changes for clarity -- no code changes
boisy
parents: 1145
diff changeset
40 ex@ rts
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
41
1783
884c56f17214 Minor source changes for clarity -- no code changes
boisy
parents: 1145
diff changeset
42 ClockNam fcs /Clock/
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
43