Hi there! I've got a question. Does anyone know what's the physical address where the system stores current date and time? Thanks in advance. _OuzO_
Posted on 2001-03-02 11:17:00 by _OuzO_
Well first of all in Win physical adress does not mean nothing...advanced (eh...somehow) memory management features of the OS make each programm "think" he owns a 0...4Gigabytes of clear empty (eh somehow) adress space... You can get the physical time from the CMOS or BIOS but then you need to write a VXD beacuse Win will not let you access physycal memory and input/output ports (to avoid crash) ...well to be honest Win95 will let you...but latter versions as 98, Me and mostly 2K will less and less let you do that
Posted on 2001-03-02 23:18:00 by BogdanOntanu
It's not a "physical" location, but win does have a structure called SYSTEMTIME (see windows.inc). Then see the GetSystemTime and GetLocalTime functiions. :)
Posted on 2001-03-03 00:57:00 by S/390
Yes, I want to by-pass Windows and get the physical time from CMOS. That's the point! May I see CMOS as part of my address space? Where can I get info about CMOS?
Posted on 2001-03-05 03:07:00 by _OuzO_
070 - 07F CMOS RealTimeClock (AT) ---------------------------------- 070 - address register of CMOS RealTimeClock. To address Data register, write only. 071 - Data register of CMOS RealTimeClock, read and write. Register 00 Seconds, Clock Time Register 01 Seconds, Alarm Time Register 02 Minutes, Clock Time Register 03 Minutes, Alarm Time Register 04 Hours, Clock Time Register 05 Hours, Alarm Time Register 06 Day of Week, 0=Monday Register 07 Day of Month Register 08 Month Register 09 Year, 0=1980 Register 0A-0D Status register A-D Register 0E Diagnose register Register 0F Shutdown register that's it.
Posted on 2001-03-05 09:31:00 by Test Department
Wow, GREAT!!! Thanks alot! _OuzO_
Posted on 2001-03-05 11:25:00 by _OuzO_
So if I want to read the month, first I must write 0x08 on port 0x70 and then read data from port 0x71. Is it true?
Posted on 2001-03-07 08:00:00 by _OuzO_