home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Secrets (4th Edition) / Windows95Secrets4thEdition.iso / utility / configur / cmossave / cmos.txt < prev    next >
Encoding:
Text File  |  1995-05-11  |  13.3 KB  |  372 lines

  1. CMOS.TXT
  2.  
  3. Last updated 1995 May 11 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. 5. CMOSRest can also be used to toggle between two CMOS
  22. configurations, for example with and without a removable hard
  23. drive installed.
  24.  
  25. 6. CMOSChk can detect subtle corruption to CMOS, as might be
  26. caused by a rogue program or a virus, something that might slow
  27. your machine or make it unreliable.
  28.  
  29. 7. CMOSSave can create a backup of your CMOS on floppy.  This way
  30. you may safely experiment with CMOS settings.  You can always
  31. get back to where you started by using CMOSRest to restore the
  32. original settings.  Any time you meddle with the computer innards, you 
  33. might accidentally disconnect the battery, losing CMOS.  CMOSSAVE 
  34. lets you put it back the way it was.
  35.  
  36. Syntax
  37. ******
  38.  
  39. There are three utilities in the CMOS suite:
  40.  
  41. CMOSSAVE.COM  A:Myfile.Sav
  42. IF ERRORLEVEL 1 GO TO Trouble
  43.  
  44.         - saves a copy of CMOS in a file on hard disk or floppy.
  45.  
  46. CMOSREST.COM  A:MyFile.Sav
  47. IF ERRORLEVEL 1 GO TO Trouble
  48.  
  49.         - restores CMOS from a file on hard disk or floppy.
  50.  
  51. CMOSCHK.COM   A:MyFile.Sav
  52. IF ERRORLEVEL 1 GO TO FixIt
  53.  
  54.          - checks that CMOS has not been meddled with since the
  55.            last CMOSSAVE.  Compares CMOS with a file on hard disk
  56.            or floppy.
  57.  
  58. Hints on Use
  59. ************
  60.  
  61. There are three ways you can use the suite manually,
  62. automatically, and with a rescue diskette.
  63.  
  64. 1.  Manually.  Copy your CMOS to a bootable floppy with:
  65.        CMOSSAVE.com A:\CMOS.SAV
  66.     If ever your cmos becomes corrupted, correct it by booting
  67.     from floppy and typing:
  68.         CMOSREST.com A:\CMOS.SAV
  69.     Then rebooting.  Don't bother with CMOSCHK.com.
  70.  
  71. 2.  With a rescue diskette.  Prepare a bootable floppy with an
  72.     autoexec.bat that invokes the following commands to correct
  73.     most CMOS and hard disk problems:
  74.     CMOSREST A:\CMOS.SAV
  75.     BOOTREST A:\BOOT.SAV
  76.     CHKDSK C:/F
  77.     SYS C:
  78.     COPY A:\COMMAND.COM  C:\
  79.     COPY A:\COMMAND.COM  C:\DOS
  80.  
  81. 3.  Automatically. Insert the line:
  82.     CALL C:\BAT\CHKCMOS.BAT
  83.     in your autoexec.bat.   This bat file uses CMOSCHK.com to 
  84.     compare the contents of CMOS with what it should be.
  85.     If there is a mismatch, it will invoke
  86.     CMOSREST.com to put it back. then REBOOT.com to try again.
  87.     Note this method will not be able to recover if the CMOS
  88.     is badly damaged.  You will have to revert to method 1 or 2.
  89.     Note that CHKCMOS.BAT needs to be configured with a text
  90.     editor before use.
  91.  
  92.  
  93. Belt And Suspenders
  94. *******************
  95.  
  96. Do a CMOSSAVE both to hard disk and to floppy.  The hard disk
  97. copy can be used for quick restores built into your AUTOEXEC.BAT
  98. file.
  99.  
  100. CMOSCHK.COM  C:\MyCMOS.Sav
  101. IF ERRORLEVEL 1 CMOSREST.COM  C:\MyCMOS.Sav
  102.  
  103. At that point you must reboot before the restored cmos settings
  104. take effect.  See CHKCMOS.BAT for a realistic way to handle
  105. this.  You will will have to tune that BAT file a little to suit
  106. your machine, either by replacing the %XXX% or inserting SET commands.
  107.  
  108. Sometimes CMOS will be so badly damaged the hard disk parameters
  109. will be corrupt and your hard disk will stop working.  In that
  110. case you will have to revert to using the floppy copy.
  111.  
  112. Whenever you change your CMOS setting deliberately, you need to
  113. redo the CMOSSAV.COM.  However USE A NEW FILENAME, so that you
  114. can easily revert to the old version if your new settings do not
  115. pan out.
  116.  
  117. How it works
  118. ************
  119.  
  120. CMOSSAVE.COM simply copies the 128 byte contents of the CMOS
  121. bytes to a file.  CMOSREST.COM copies them back.  CMOSCHK
  122. compares them with the file contents.  If they are not equal it
  123. sets ERRORLEVEL 1.
  124.  
  125. CMOSREST does not touch bytes 0 to 09 and 32h because these are
  126. volatile -- they contain the date and time.  Similarly CMOSCHK,
  127. does not panic if any of these volatile bytes differ.  However,
  128. CMOSSAVE saves all 128 bytes, so that you can browse the
  129. generated file with a hex editor to learn more about how CMOS
  130. works.  You could even patch the CMOS.SAV file to get special
  131. effects.
  132.  
  133. Because CMOSSave also saves the extended CMOS bytes, CMOSRest
  134. will restore the esoteric options like shadow RAM, wait states,
  135. processor clock speed, HMA enable etc.
  136.  
  137. These is no need to calculate checksums, since the checksum is
  138. saved and restored just like any other CMOS byte.
  139.  
  140. We have included a sample file called CHKCMOS.BAT which can be inserted
  141. in your AUTOEXEC.BAT which uses all three utilities.  Using it requires
  142. fairly good knowledge of BAT files to customize it for your
  143. needs.
  144.  
  145.  
  146. How CMOS is used
  147. ****************
  148.  
  149. CMOS is battery backed RAM that stores configuration information
  150. when the power is off.  It is on my top ten worst ideas list of
  151. all time.  The problem is, CMOS is far too easily corrupted, by
  152. programs, power or meddling.
  153.  
  154. See CMOS.OFS for a detailed list of what each byte in the CMOS
  155. is used for.
  156.  
  157. Troubleshooting
  158. ***************
  159.  
  160. Sometimes your CMOS will be so wrecked you cannot even get your
  161. machine limping enough to run CMOSREST from floppy.  In that
  162. case you must clear CMOS.  Do this on AMI BIOSes by holding down
  163. the INS key, powering off, powering on, then releasing the INS
  164. key.  In the worst case, remove the battery and let the
  165. capacitance on the board drain overnight to clear it. On some
  166. CMOSes you can clear CMOS by selecting universal default
  167. settings.
  168.  
  169. You can then get a bare bones CMOS configured -- that just has
  170. the floppies right.  From there you can run CMOSREST.COM.
  171.  
  172. What is considered volatile and what is not, might vary for
  173. different boards.  If you have trouble restoring, DO NOT
  174. DESPAIR.  All is recorded.  A variant of the CMOSREST program
  175. could get you back.  All you need do in make a slight modification
  176. to the assembler source VOLATILE routine that decides which bytes
  177. to consider volatile.  Even a very junior MASM programmer could 
  178. make that modification for you.
  179.  
  180. If you use SSTOR, I suspect it makes it look as though it had
  181. modified CMOS.  If you boot without the SSTOR driver, CMOS will
  182. appear to have changed because SSTOR is not doing its standard
  183. trickery.
  184.  
  185. The TURBO setting is part of CMOS.  If you accidentally turn
  186. turbo mode off, CMOS will appear to be changed, and CMOSCHK will
  187. complain.  To clear the problem, set turbo back on and allow the
  188. CMOSCHK to restore CMOS.
  189.  
  190. ***************************************************************
  191. ***************************************************************
  192. We repeat: CMOSREST won't do you a lick of good unless you run
  193. CMOSSAVE BEFORE you have trouble.  Make sure you have copies of
  194. CMOS.SAV both on hard disk and on floppy.
  195. ***************************************************************
  196. ***************************************************************
  197.  
  198. There is a companion program called BOOTSAVE that works in a
  199. similar way to protects your boot track from damage by rogue
  200. programs or viruses.  Again, you must use it BEFORE you have
  201. trouble.  When you register, I will send you a copy of BOOTSAVE,
  202. and REBOOT, which are useful adjuncts to CMOSSAVE.
  203.  
  204. CMOSREST does not take effect until you REBOOT!!
  205.  
  206. Verification Fire Drill
  207. ***********************
  208.  
  209. CMOSSave and CMOSTRest have internal checks to warn you if they
  210. are not functioning.  However, you can assure yourself they are
  211. working properly by using CMOSSave, then changing some minor
  212. setting in CMOS (e.g. to add an extra unneeded wait state), then
  213. use CMOSChk to detect the "damage" then CMOSRest to restore the
  214. CMOS back the way it was.  If all is working correctly, the
  215. minor change should be undone.
  216.  
  217. False Alarm CMOSCHK Corruption Messages
  218. ***************************************
  219.  
  220. Some non-standard BIOSes have additional volatile portions that
  221. CMOSCHK does not know about.  It will report false corruptions.
  222. There are three ways you can handle the problem:
  223.  
  224. 1. Send us a screen print of what CMOSCHK is saying.  We will
  225. send you a custom version with those false mismatches considered
  226. as volatile bytes.  You must register if you want this service.
  227.  
  228. 2. Modify the "VolatileList" line in CMOS.ASM yourself to
  229. include the extra offsets your BIOS is treating as volatile.
  230. Then reassemble.  CmosChk.com will give you a list of offsets
  231. where it thinks there are mismatches.  It is up to you to
  232. determine which ones you think are false alarms.
  233.  
  234. 3. Simply avoid using CMOSChk.  Just use CMOSSAVE and CMOSREST.
  235. Most of the time damaged CMOS is fairly obvious.
  236.  
  237. Author
  238. ******
  239.  
  240. CMOSSAVE, CMOSREST and CMOSCHK are copyrighted but may be freely
  241. used for any purpose except military.
  242. If you pass the files on, PLEASE PASS ON THIS DOCUMENTATION TOO.
  243.  
  244. Please report bugs and problems to:
  245. Roedy Green
  246. Canadian Mind Products
  247. #601 - 1330 Burrard
  248. Vancouver BC Canada
  249. V6Z 2B8
  250. (604) 685-8412
  251.  
  252. Electronic mail users can contact me via internet:
  253. roedy@bix.com
  254.  
  255. Harvey Fishman wrote a pair of programs similar to CMOSSAVE and
  256. CMOSREST, but to the best of my knowledge, never released them.
  257.  
  258. Support is available only to registered users.
  259.  
  260. Shareware Status
  261. ****************
  262.  
  263. CMOSSAVE CMOSREST and CMOSCHK are shareware.  If you like them send
  264. $20 US or Canadian to:
  265.  
  266. CMOSSAVE
  267. Roedy Green
  268. Canadian Mind Products
  269. #601 - 1330 Burrard
  270. Vancouver BC Canada
  271. V6Z 2B8
  272. (604) 685-8412
  273.  
  274. Sorry we can no longer accept credit cards. The company was
  275. wiped out by criminals and we are just a thread of our former
  276. selves. Personal cheques are fine.  Please make them payable to Canadian
  277. Mind Products.
  278.  
  279. Please mention the program title since we sell many other
  280. products.
  281.  
  282. We in return will send you the latest version complete with MASM
  283. source for CMOSSAVE, CMOSREST, CMOSCHK, REBOOT, BOOTSAVE,
  284. BOOTREST and BOOTCHK.  We will also include a 1.2 MB or 1.44 diskette
  285. (please specify your preference) full of the source code for the
  286. complete CMP suite of other utilities.
  287.  
  288. If you don't register, and continue to use CMOSSAVE, we will not
  289. do anything mean to you.  We don't even want you to feel
  290. unusually guilty.  It is theft, however.  Your mom might not
  291. approve if she knew.
  292.  
  293. Consider that if you DO register, that supports the creation of
  294. more shareware software such as this.
  295.  
  296. Columnist Karen Kenworthy tells me CMOSSAVE has been downloaded
  297. over 10,000 times from America Online alone.  So far we have received
  298. 27 registrations in total.  CMOSSAVE is our most frequently
  299. registered utility.  We have written scores of such utilities.
  300. You can see that shareware authors don't get rich, but
  301. distributors such as AOL and Compuserve do.
  302.  
  303. SITE LICENSES
  304. *************
  305.  
  306. If you wish a site license to use CMOSSAVE on multiple machines
  307. you can compute the cost using the following formula:
  308.  
  309. Unit cost = $20 * sqrt( 1/n ) where n is the number of copies.
  310.  
  311. Total cost = $20 * n * sqrt( 1/n ) rounded the nearest dollar if
  312. you wish.
  313.  
  314.  
  315.                Average    Incremental
  316.    Copies    Unit Cost        Cost        Total
  317.  
  318.         1       $20.00      $20.00       $20.00
  319.         2       $14.14       $8.28       $28.28
  320.         3       $11.55       $6.36       $34.64
  321.         4       $10.00       $5.36       $40.00
  322.         5        $8.94       $4.72       $44.72
  323.         6        $8.16       $4.27       $48.99
  324.         7        $7.56       $3.93       $52.92
  325.         8        $7.07       $3.65       $56.57
  326.         9        $6.67       $3.43       $60.00
  327.        10        $6.32       $3.25       $63.25
  328.        15        $5.16       $2.63       $77.46
  329.        20        $4.47       $2.26       $89.44
  330.        25        $4.00       $2.02      $100.00
  331.        30        $3.65       $1.84      $109.54
  332.        40        $3.16       $1.59      $126.49
  333.        50        $2.83       $1.42      $141.42
  334.        75        $2.31       $1.16      $173.21
  335.       100        $2.00       $1.00      $200.00
  336.       200        $1.41       $0.71      $282.84
  337.       250        $1.26       $0.63      $316.23
  338.       500        $0.89       $0.45      $447.21
  339.      1000        $0.63       $0.32      $632.46
  340.     10000        $0.20       $0.10    $2,000.00
  341.  
  342. Ten thousand copies is considered an unlimited site license.
  343.  
  344. Unlimited licence would entitle you to a non-exclusive
  345. irrevocable worldwide licence to use, copy and distribute
  346. CMOSSAVE within your own organization.  You would not have the
  347. right to sell it to other parties. Howvever, if you were a retailer, or
  348. manufacturer, it would give you the right to install it on any
  349. machines you sell.  If you were a consultant, it would give you the 
  350. right to install it on any machines you service.
  351.  
  352. You may modify the source code to your own requirements, but the
  353. name and address of Canadian Mind Products must not be removed
  354. from the executable code COM file.  However, our name and
  355. address need not display when CMOSSAVE is run. CMOSSAVE must be
  356. used for non-military purposes only.
  357.  
  358. Please mail cheque, money order to:
  359.  
  360. CMOSSAVE
  361. Roedy Green
  362. Canadian Mind Products
  363. #601 - 1330 Burrard Street
  364. Vancouver, BC
  365. V6Z 2B8
  366.  
  367. Telephone (604) 685-8412
  368.  
  369. Support is available only to registered users.
  370.  
  371. -30-
  372.