home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / cmos16.zip / CMOS.TXT < prev    next >
Text File  |  1994-08-28  |  6KB  |  195 lines

  1. CMOS.TXT
  2.  
  3. Last updated 1994 August 29 by Roedy Green
  4.  
  5. Purpose
  6. *******
  7.  
  8. 1. Naive users sometimes meddle with CMOS settings.  We need a
  9. fast way to put the scores of subtle CMOS configuration settings
  10. back the way they were.
  11.  
  12. 2. Power surges can corrupt CMOS.  We need a way for a naive
  13. user to quickly restore all the CMOS settings.
  14.  
  15. 3. If the battery fails, the contents will be lost.  We need a
  16. way to restore a known working CMOS configuration.
  17.  
  18. 4. You may want to alter some obscure CMOS setting and you don't
  19. have a program to set it.
  20.  
  21. Syntax
  22. ******
  23.  
  24. There are three utilities in the CMOS suite:
  25.  
  26. CMOSSAVE.COM  A:Myfile.Sav
  27. IF ERRORLEVEL 1 GO TO Trouble
  28.  
  29.         - saves a copy of CMOS in a file on hard disk or floppy.
  30.  
  31. CMOSREST.COM  A:MyFile.Sav
  32. IF ERRORLEVEL 1 GO TO Trouble
  33.  
  34.         - restores CMOS from a file on hard disk or floppy.
  35.  
  36. CMOSCHK.COM   A:MyFile.Sav
  37. IF ERRORLEVEL 1 GO TO FixIt
  38.  
  39.          - checks that CMOS has not been meddled with since the
  40.            last CMOSSAVE.  Compares CMOS with a file on hard disk
  41.            or floppy.
  42.  
  43. Hints on Use
  44. ************
  45.  
  46. Do a CMOSSAVE both to hard disk and to floppy.  The hard disk
  47. copy can be used for quick restores built into your AUTOEXEC.BAT
  48. file.
  49.  
  50. CMOSCHK.COM  C:\MyCMOS.Sav
  51. IF ERRORLEVEL 1 CMOSREST.COM  C:\MyCMOS.Sav
  52.  
  53. At that point you must reboot before the restored cmos settings
  54. take effect.  See CHKCMOS.BAT for a realistic way to handle
  55. this.  You will will have to tune that BAT file a little to suit
  56. your machine, either by replacing the %XXX% or inserting SET commands.
  57.  
  58. Sometimes CMOS will be so badly damaged the hard disk parameters
  59. will be corrupt and your hard disk will stop working.  In that
  60. case you will have to revert to using the floppy copy.
  61.  
  62. Whenever you change your CMOS setting deliberately, you need to
  63. redo the CMOSSAV.COM.  However USE A NEW FILENAME, so that you
  64. can easily revert to the old version if your new settings do not
  65. pan out.
  66.  
  67. How it works
  68. ************
  69.  
  70. CMOSSAVE.COM simply copies the 128 byte contents of the CMOS
  71. bytes to a file.  CMOSREST.COM copies them back.  CMOSCHK
  72. compares them with the file contents.  If they are not equal it
  73. sets ERRORLEVEL 1.
  74.  
  75. CMOSREST does not touch bytes 0 to 09 and 32h because these are
  76. volatile -- they contain the date and time.  Similarly CMOSCHK,
  77. does not panic if any of these volatile bytes differ.  However,
  78. CMOSSAVE saves all 128 bytes, so that you can browse the
  79. generated file with a hex editor to learn more about how CMOS
  80. works.  You could even patch the CMOS.SAV file to get special
  81. effects.
  82.  
  83. Because CMOSSave also saves the extended CMOS bytes, CMOSRest
  84. will restore the esoteric options like shadow RAM, wait states,
  85. processor clock speed, HMA enable etc.
  86.  
  87. These is no need to calculate checksums, since the checksum is
  88. saved and restored just like any other CMOS byte.
  89.  
  90. I have included a file called CHKCMOS.BAT which can be inserted
  91. in your AUTOEXEC.BAT which uses all three utilities.
  92.  
  93.  
  94. How CMOS is used
  95. ****************
  96.  
  97. CMOS is battery backed RAM that stores configuration information
  98. when the power is off.  It is on my top ten worst ideas list of
  99. all time.  The problem is, CMOS is far too easily corrupted, by
  100. programs, power or meddling.
  101.  
  102. See CMOS.OFS for a detailed list of what each byte in the CMOS
  103. is used for.
  104.  
  105. Troubleshooting
  106. ***************
  107.  
  108.  
  109. Sometimes your CMOS will be so wrecked you cannot even get your
  110. machine limping enough to run CMOSREST from floppy.  In that
  111. case you must clear CMOS.  Do this on AMI BIOSes by holding down
  112. the INS key, powering off, powering on, then releasing the INS
  113. key.  In the worst case, remove the battery and let the
  114. capacitance on the board drain overnight to clear it.
  115.  
  116. You can then get a bare bones CMOS configured -- that just has
  117. the floppies right.  From there you can run CMOSREST.COM.
  118.  
  119. What is considered volatile and what is not, might vary for
  120. different boards.  If you have trouble restoring, DO NOT
  121. DESPAIR.  All is recorded.  A variant of the CMOSREST program
  122. could get you back.  All you need do in make a slight modification
  123. to the assembler source VOLATILE routine that decides which bytes
  124. to consider volatile.  Even a very junior MASM programmer could 
  125. make that modification for you.
  126.  
  127. If you use SSTOR, I suspect it makes it look as though it had
  128. modified CMOS.  If you boot without the SSTOR driver, CMOS will
  129. appear to have changed because SSTOR is not doing its standard
  130. trickery.
  131.  
  132. I repeat: CMOSREST won't do you a lick of good unless you run
  133. CMOSSAVE BEFORE you have trouble.  Make sure you have copies of
  134. CMOS.SAV both on hard disk and on floppy.
  135.  
  136. There is a companion program called BOOTSAVE that works in a
  137. similar way to protects your boot track from damage by rogue
  138. programs or viruses.  Again, you must use it BEFORE you have
  139. trouble.
  140.  
  141. Author
  142. ******
  143.  
  144. CMOSSAVE, CMOSREST and CMOSCHK are copyrighted but may be freely
  145. used for any purpose except military.
  146.  
  147. If you pass the files on, PLEASE PASS ON THIS DOCUMENTATION TOO.
  148.  
  149. Please report bugs and problems to:
  150. Roedy Green
  151. Canadian Mind Products
  152. #601 - 1330 Burrard
  153. Vancouver BC Canada
  154. V6Z 2B8
  155. (604) 685-8412
  156.  
  157. Electronic mail users can contact me via internet:
  158. roedy@bix.com
  159.  
  160. Harvey Fishman wrote a pair of programs similar to CMOSSAVE and
  161. CMOSREST, but to the best of my knowledge, never released them.
  162.  
  163. Shareware Status
  164. ****************
  165.  
  166. CMOSSAVE CMOSREST and CMOSCHK are shareware.  If you like them send
  167. $20 US or Canadian to:
  168.  
  169. CMOSSAVE
  170. Roedy Green
  171. Canadian Mind Products
  172. #601 - 1330 Burrard
  173. Vancouver BC Canada
  174. V6Z 2B8
  175. (604) 685-8412
  176.  
  177. Sorry we can no longer accept credit cards. The company was
  178. wiped out by criminals and we are just a thread of our former
  179. selves.
  180.  
  181. Please mention the program title since we sell many other
  182. products.
  183.  
  184. We in return will send you the latest version complete with MASM
  185. source for CMOSSAVE, CMOSREST, CMOSCHK, REBOOT, BOOTSAVE,
  186. BOOTREST and BOOTCHK.  We will also include a 1.2 MB diskette
  187. full of the source code for the complete CMP suite of other
  188. utilities.
  189.  
  190. If you don't register, we will not do anything mean to you.  We
  191. don't even want you to feel guilty.  This is fee is purely
  192. voluntary.  Enjoy.
  193.  
  194. -30-
  195.