🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.acorn.tech
Article #206

Re: Reading from the CMOS clock

#206
From: 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. ---
Technical Details
Message-ID: <1992Sep1.164514.15053@infodev.cam.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!cl.cam.ac.uk!nas20
References: <1992Sep1.104148.12279@infodev.cam.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!cl.cam.ac.uk!nas20
From: nas20@cl.cam.ac.uk (Nick Smith)
Newsgroups: comp.sys.acorn.tech
Subject: Re: Reading from the CMOS clock
Message-ID: <1992Sep1.164514.15053@infodev.cam.ac.uk>
Date: 1 Sep 92 16:45:14 GMT
References: <1992Sep1.104148.12279@infodev.cam.ac.uk>
Sender: news@infodev.cam.ac.uk (USENET news)
Reply-To: nas20@cl.cam.ac.uk (Nick Smith)
Organization: U of Cambridge Comp Lab, UK
Lines: 18
Nntp-Posting-Host: mepal.cl.cam.ac.uk