🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.acorn.tech
2 messages
2 total messages Started by Nick Smith Tue, 01 Sep 1992 10:41
Reading from the CMOS clock
#205
Author: Nick Smith
Date: Tue, 01 Sep 1992 10:41
18 lines
1362 bytes
I'm having a little trouble with some code I'm writing at the moment:

For various essential reasons, I have to turn off interrupts for upto
several minutes at a time. What I *want* to do, is preserve the real time
clock (I know how long I will have interrupts disabled exactly)

I know that the soft copy of the realtime clock will halt during this period,
but I felt sure that the CMOS (hardware) clock, which after all works when
the machine is switched off, would continue happily with no interrupts ...

I am using OS_Word,14,1 which claims to read the real time from CMOS clock in
BCD (ug) format. Thing is, it contains the same value before & after the
code with no ints. has been called.

So what am I doing wrong ???!
--
Nick Smith, Churchill College, Cambridge, UK.  %$%  Email: nas20@uk.ac.cam.phx
sig quote wanted - must be under guarantee.   $%$  --- Usual disclaimer. ---
Re: Reading from the CMOS clock
#206
Author: Nick Smith
Date: Tue, 01 Sep 1992 16:45
18 lines
1518 bytes
In article <1992Sep1.104148.12279@infodev.cam.ac.uk> nas20@cl.cam.ac.uk (Nick Smith) writes:
>I'm having a little trouble with some code I'm writing at the moment:
>
>For various essential reasons, I have to turn off interrupts for upto
>several minutes at a time. What I *want* to do, is preserve the real time
>clock (I know how long I will have interrupts disabled exactly)
>
Oh yeah, I have tried adding the time delay to the old clock value, then 
writing it, but the time-based SWIs are rather limiting - you can only read
the CMOS clock as BCD (precision 1 sec), and you can only write the CMOS
clock as a string, and while there is a SWI to convet BCD->string a) it has
insufficient precision, and b) it requires that you know how many days are there in each month, and worry about leap years, etc, etc - too much hassle !



--
Nick Smith, Churchill College, Cambridge, UK.  %$%  Email: nas20@uk.ac.cam.phx
sig quote wanted - must be under guarantee.   $%$  --- Usual disclaimer. ---
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads