Mercurial > hg > Members > kono > nitros9-code
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level2/modules/kernel/fstime.asm Tue Apr 22 19:35:48 2003 +0000 @@ -0,0 +1,43 @@ +************************************************** +* System Call: F$STime +* +* Function: Set system time +* +* Input: X = Address of time packet: +* +* Offset 0 = Year +* Offset 1 = Month +* Offset 2 = Day +* Offset 3 = Hour +* Offset 4 = Minute +* Offset 5 = Second +* +* Output: System time/date set +* +* Error: CC = C bit set; B = error code +* +FSTime ldx R$X,u Get address that user wants time packet +*** tfr dp,a Set MSB of D to direct page +*** ldb #D.Time Offset to Time packet in direct page +*** tfr d,u Point U to it + ldu #D.Time --- DP=0 always + ldy <D.Proc Get ptr to process that called us + lda P$Task,y Get task # from process + ldb <D.SysTsk Get task # of system process + ldy #6 6 byte packet to move + os9 F$Move Go move it + ldx <D.Proc Get ptr to process that called us + pshs x Preserve it + ldx <D.SysPrc Get ptr to system process + stx <D.Proc Save as current process + lda #$C1 Link to Clock module + leax L07E3,pc + os9 F$Link + puls x Get back ptr to user's process + stx <D.Proc Make it the active process again + bcs L0816 If error in Link, exit with error code + jmp ,y Jump into Clock +L0816 rts + +L07E3 fcs /Clock/ +