Accessing CMOS bytes is a very simple process using using an index/data
register format in the PC port space (index = port 0x70, data = 0x71). To
do this in Windows, you will have to write a driver (I don't know of any
easy Windows-supplied back doors to access this). The driver is pretty
simple, but with some caveats:
1) I assume your driver should not try standard DDK mapping of I/O
ports, as they are already mapped by Window's RTC driver. You would have to
just have to access ports directly with inp and outp (not the general
Microsoft-recommended procedure).
2) RTC/CMOS access is non-atomic. If you use the standard bank 0 of
CMOS, you run a very good chance of creating race conditions with the
OS/BIOS that may be accessing CMOS or more likely the RTC (real-time clock).
3) BIOS probably checksums the first CMOS bank. If you change bytes in
this bank, if you don't update checksum in correct manner, BIOS may complain
on next boot.
4) Be careful about handling of special bits (such as bit 7) of index
register. Any CMOS/RTC specs should discuss these type issues.
5) Remember first several CMOS values in bank 0 are RTC registers, not
actual storage locations.
Many modern chipsets (including Intel's) provide a second bank of CMOS. Use
of this is probably a safer bet in your case. BIOS may use this for storing
setup or escape-D data, though they often skip the 2nd bank and store this
PNP-type data on the same flash chip (FWH) that stores the BIOS code. You
would need to try to ensure that BIOS does not use the second bank also if
you're application is going to access it.
In short, using BIOS to store application data may not be clean, but it is
possible (depending on resources provided by your motherboard). Unless
Windows provides a back-door method for accessing this throught the RTC
driver, you will probably have to write a driver yourself.
"Nikolai Vorontsov" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi, Simon!
>
> this could help
> http://www.pscode.com/vb/scripts/Sho...=6261&lngWId=3
>
> PPL, use Google! The greate thing.
>
> > Thanks Nikolai
> >
> > I know about DLPortIO, and have it as an XPe component if any-one wants
it.
> > That allows me to access the ports, but I didn't think I could get at
the
> > CMOS RAM that way. If you can tell me how.
> >
> --
> WBR, Nikolai Vorontsov
> Quadrox NV
>