home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / msdos / programm / 9009 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.6 KB

  1. Path: sparky!uunet!wupost!waikato.ac.nz!canterbury.ac.nz!phys169
  2. Newsgroups: comp.os.msdos.programmer
  3. Subject: reading CMOS (was Re: Read BIOS - whoops)
  4. Message-ID: <1992Sep3.144719.634@csc.canterbury.ac.nz>
  5. From: phys169@csc.canterbury.ac.nz
  6. Date: 3 Sep 92 14:47:19 +1200
  7. Organization: University of Canterbury, Christchurch, New Zealand
  8. Lines: 28
  9.  
  10. Yes, it is possible to read the CMOS clock and RAM quite easily, but do you
  11. mean a PC or an AT? (the original, 8088, PC CMOS is totally different).
  12.  
  13. For an 8088 PC, to read the CMOS (assuming it has it), you need to know the
  14. starting port address, which varies from board to board.  The best idea is to
  15. try some likely ports, avoiding known system ports of course, and see if one
  16. has a valid hex number seems to be cycling 1000 times a second (or something 
  17. like that).
  18.  
  19. For an AT, there is always ports 70h and 71h, and you use them like this...
  20.  
  21. output a number (0 to 3Fh) to port 70h, saying which CMOS clock/RAM cell you
  22. want, then
  23.  
  24. read or write port 71h (1 byte of data).  Be careful not to access port 70h
  25. without also accessing port 71h - apparently it can ruin the chip. Also be
  26. aware that you can get "false" readings (255) from the clock registers at
  27. times.
  28.  
  29. The PC/XT CMOS RAM has a separate port addresses for each cell (but has less
  30. cells, and the clock cells are in a different order.
  31.  
  32. For more information, have a look at the documenation file that comes with my
  33. program CMOS299.ZIP, or at the INFOPLUS package, that has sources.  (Actually,
  34. you can get the sources to my CMOS setup program too if you ask nicely).
  35.  
  36. Hope this helps,
  37. Mark Aitchison, University of Canterbury.
  38.