972
edits
[unchecked revision] | [unchecked revision] |
No edit summary |
m (Bot: Replace deprecated source tag with syntaxhighlight) |
||
(One intermediate revision by one other user not shown) | |||
Line 37:
as follows:
* <tt>outb (0x70, (NMI_disable_bit << 7) | (selected CMOS register number));</tt>
Once a register is selected, you either read the value of that register on Port 0x71 (with inb or an equivalent
function), or you write a new value to that register -- also on Port 0x71 (with outb, for example):
* <tt>val_8bit = inb (0x71);</tt>
Note1: Reading or writing Port 0x71 seems to default the "selected register" back to 0xD. So you need to
Line 207:
=== Reading from the CMOS ===
<
ReadFromCMOS (unsigned char array [])
{
Line 229:
}
}
</syntaxhighlight>
=== Writing to the CMOS ===
<
WriteTOCMOS(unsigned char array[])
{
Line 252:
}
}
</syntaxhighlight>
=== Reading All RTC Time and Date Registers ===
<
#define CURRENT_YEAR 2023 // Change this each year!
Line 364:
}
}
</syntaxhighlight>
== See Also ==
|