home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / acorn / tech / 86 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.5 KB

  1. Path: sparky!uunet!mcsun!uknet!pavo.csi.cam.ac.uk!cl.cam.ac.uk!nas20
  2. From: nas20@cl.cam.ac.uk (Nick Smith)
  3. Newsgroups: comp.sys.acorn.tech
  4. Subject: Re: Reading from the CMOS clock
  5. Message-ID: <1992Sep1.164514.15053@infodev.cam.ac.uk>
  6. Date: 1 Sep 92 16:45:14 GMT
  7. References: <1992Sep1.104148.12279@infodev.cam.ac.uk>
  8. Sender: news@infodev.cam.ac.uk (USENET news)
  9. Reply-To: nas20@cl.cam.ac.uk (Nick Smith)
  10. Organization: U of Cambridge Comp Lab, UK
  11. Lines: 18
  12. Nntp-Posting-Host: mepal.cl.cam.ac.uk
  13.  
  14. In article <1992Sep1.104148.12279@infodev.cam.ac.uk> nas20@cl.cam.ac.uk (Nick Smith) writes:
  15. >I'm having a little trouble with some code I'm writing at the moment:
  16. >
  17. >For various essential reasons, I have to turn off interrupts for upto
  18. >several minutes at a time. What I *want* to do, is preserve the real time
  19. >clock (I know how long I will have interrupts disabled exactly)
  20. >
  21. Oh yeah, I have tried adding the time delay to the old clock value, then 
  22. writing it, but the time-based SWIs are rather limiting - you can only read
  23. the CMOS clock as BCD (precision 1 sec), and you can only write the CMOS
  24. clock as a string, and while there is a SWI to convet BCD->string a) it has
  25. 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 !
  26.  
  27.  
  28.  
  29. --
  30. Nick Smith, Churchill College, Cambridge, UK.  %$%  Email: nas20@uk.ac.cam.phx
  31. sig quote wanted - must be under guarantee.   $%$  --- Usual disclaimer. ---
  32.