CMOS: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
Combuster (talk | contribs)
m Reverted edits by Imate900 (Talk); changed back to last version by Jnc100
reorganized sections for examples, sorry about last edit
Line 5: Line 5:
To access CMOS RAM, the index address (0 to 7F hex) is output to port 70h, and the data is then read or written at port 71h.
To access CMOS RAM, the index address (0 to 7F hex) is output to port 70h, and the data is then read or written at port 71h.


== Example Reading ==
== Examples ==
Example, showing how to read from the CMOS: (this examples contains intel style [[assembly]], not [[GAS]] which is used in [[GCC]])
All these examples use Intel-style [[assembly]].
=== Reading from the CMOS ===

<pre>
<pre>
ReadFromCMOS (unsigned char array [])
ReadFromCMOS (unsigned char array [])
Line 35: Line 35:
}
}
</pre>
</pre>
=== Writing to the CMOS ===

== Example Writing ==
Example showing how to write:

<pre>
<pre>
WriteTOCMOS(unsigned char array[])
WriteTOCMOS(unsigned char array[])