looi@qut.edu.au (Mark H. Looi) (03/05/91)
I am trying to read the on-board Real-Time clock from Dos (not the Dos clock that is set at bootup time, but the battery-backed clock on a 386 machine. I gathered that the CMOS memory is at ports $70 to $7F, and to read / write the real-time clock, the register number to be inspected / modified is written to port $70, and that specified register is then mapped to port $71. However, on my machine, that returns me the DOS clock, ie: if the time has been modified with the TIME command from DOS, ports $70/$71 reflect the modified time, not the on-board clock time. This is confirmed when I reboot - the correct (unmodified time) is re-read into memory. The purpose of this is that I have some programs that tamper with the DOS clock (slowing it down considerably when they are running), and I want the correct time reset when I exit from those programs. I have a 386-25, Chips and Technologies chipset, with an AMI Bios (15 September 89). If anyone has any information about what I'm doing wrong or how to accomplish what I want (maybe info on PD / Shareware programs that do what I want), please e-mail or post your replies. Thanks. Mark ------------------------------------------------------------------------------- Mark H. Looi m.looi@qut.edu.au Information Security Research Centre Queensland University of Technology Work: (07) 864-1029 Gardens Point Campus Fax: (07) 221-2384 Brisbane, QLD, Australia Home: (07) 273-6100 Also: Referee, Budweiser League & Secretary, Qld Gridiron Officials Association