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_
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
It's not a "physical" location, but win does have a structure called SYSTEMTIME (see windows.inc). Then see the GetSystemTime and GetLocalTime functiions. :)
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?
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.
Wow, GREAT!!! Thanks alot! _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?