home *** CD-ROM | disk | FTP | other *** search
- CMOS.TXT
-
- Last updated 1995 May 11 by Roedy Green
-
- Purpose
- *******
-
- 1. Naive users sometimes meddle with CMOS settings. We need a
- fast way to put the scores of subtle CMOS configuration settings
- back the way they were.
-
- 2. Power surges can corrupt CMOS. We need a way for a naive
- user to quickly restore all the CMOS settings.
-
- 3. If the battery fails, the contents will be lost. We need a
- way to restore a known working CMOS configuration.
-
- 4. You may want to alter some obscure CMOS setting and you don't
- have a program to set it.
-
- 5. CMOSRest can also be used to toggle between two CMOS
- configurations, for example with and without a removable hard
- drive installed.
-
- 6. CMOSChk can detect subtle corruption to CMOS, as might be
- caused by a rogue program or a virus, something that might slow
- your machine or make it unreliable.
-
- 7. CMOSSave can create a backup of your CMOS on floppy. This way
- you may safely experiment with CMOS settings. You can always
- get back to where you started by using CMOSRest to restore the
- original settings. Any time you meddle with the computer innards, you
- might accidentally disconnect the battery, losing CMOS. CMOSSAVE
- lets you put it back the way it was.
-
- Syntax
- ******
-
- There are three utilities in the CMOS suite:
-
- CMOSSAVE.COM A:Myfile.Sav
- IF ERRORLEVEL 1 GO TO Trouble
-
- - saves a copy of CMOS in a file on hard disk or floppy.
-
- CMOSREST.COM A:MyFile.Sav
- IF ERRORLEVEL 1 GO TO Trouble
-
- - restores CMOS from a file on hard disk or floppy.
-
- CMOSCHK.COM A:MyFile.Sav
- IF ERRORLEVEL 1 GO TO FixIt
-
- - checks that CMOS has not been meddled with since the
- last CMOSSAVE. Compares CMOS with a file on hard disk
- or floppy.
-
- Hints on Use
- ************
-
- There are three ways you can use the suite manually,
- automatically, and with a rescue diskette.
-
- 1. Manually. Copy your CMOS to a bootable floppy with:
- CMOSSAVE.com A:\CMOS.SAV
- If ever your cmos becomes corrupted, correct it by booting
- from floppy and typing:
- CMOSREST.com A:\CMOS.SAV
- Then rebooting. Don't bother with CMOSCHK.com.
-
- 2. With a rescue diskette. Prepare a bootable floppy with an
- autoexec.bat that invokes the following commands to correct
- most CMOS and hard disk problems:
- CMOSREST A:\CMOS.SAV
- BOOTREST A:\BOOT.SAV
- CHKDSK C:/F
- SYS C:
- COPY A:\COMMAND.COM C:\
- COPY A:\COMMAND.COM C:\DOS
-
- 3. Automatically. Insert the line:
- CALL C:\BAT\CHKCMOS.BAT
- in your autoexec.bat. This bat file uses CMOSCHK.com to
- compare the contents of CMOS with what it should be.
- If there is a mismatch, it will invoke
- CMOSREST.com to put it back. then REBOOT.com to try again.
- Note this method will not be able to recover if the CMOS
- is badly damaged. You will have to revert to method 1 or 2.
- Note that CHKCMOS.BAT needs to be configured with a text
- editor before use.
-
-
- Belt And Suspenders
- *******************
-
- Do a CMOSSAVE both to hard disk and to floppy. The hard disk
- copy can be used for quick restores built into your AUTOEXEC.BAT
- file.
-
- CMOSCHK.COM C:\MyCMOS.Sav
- IF ERRORLEVEL 1 CMOSREST.COM C:\MyCMOS.Sav
-
- At that point you must reboot before the restored cmos settings
- take effect. See CHKCMOS.BAT for a realistic way to handle
- this. You will will have to tune that BAT file a little to suit
- your machine, either by replacing the %XXX% or inserting SET commands.
-
- Sometimes CMOS will be so badly damaged the hard disk parameters
- will be corrupt and your hard disk will stop working. In that
- case you will have to revert to using the floppy copy.
-
- Whenever you change your CMOS setting deliberately, you need to
- redo the CMOSSAV.COM. However USE A NEW FILENAME, so that you
- can easily revert to the old version if your new settings do not
- pan out.
-
- How it works
- ************
-
- CMOSSAVE.COM simply copies the 128 byte contents of the CMOS
- bytes to a file. CMOSREST.COM copies them back. CMOSCHK
- compares them with the file contents. If they are not equal it
- sets ERRORLEVEL 1.
-
- CMOSREST does not touch bytes 0 to 09 and 32h because these are
- volatile -- they contain the date and time. Similarly CMOSCHK,
- does not panic if any of these volatile bytes differ. However,
- CMOSSAVE saves all 128 bytes, so that you can browse the
- generated file with a hex editor to learn more about how CMOS
- works. You could even patch the CMOS.SAV file to get special
- effects.
-
- Because CMOSSave also saves the extended CMOS bytes, CMOSRest
- will restore the esoteric options like shadow RAM, wait states,
- processor clock speed, HMA enable etc.
-
- These is no need to calculate checksums, since the checksum is
- saved and restored just like any other CMOS byte.
-
- We have included a sample file called CHKCMOS.BAT which can be inserted
- in your AUTOEXEC.BAT which uses all three utilities. Using it requires
- fairly good knowledge of BAT files to customize it for your
- needs.
-
-
- How CMOS is used
- ****************
-
- CMOS is battery backed RAM that stores configuration information
- when the power is off. It is on my top ten worst ideas list of
- all time. The problem is, CMOS is far too easily corrupted, by
- programs, power or meddling.
-
- See CMOS.OFS for a detailed list of what each byte in the CMOS
- is used for.
-
- Troubleshooting
- ***************
-
- Sometimes your CMOS will be so wrecked you cannot even get your
- machine limping enough to run CMOSREST from floppy. In that
- case you must clear CMOS. Do this on AMI BIOSes by holding down
- the INS key, powering off, powering on, then releasing the INS
- key. In the worst case, remove the battery and let the
- capacitance on the board drain overnight to clear it. On some
- CMOSes you can clear CMOS by selecting universal default
- settings.
-
- You can then get a bare bones CMOS configured -- that just has
- the floppies right. From there you can run CMOSREST.COM.
-
- What is considered volatile and what is not, might vary for
- different boards. If you have trouble restoring, DO NOT
- DESPAIR. All is recorded. A variant of the CMOSREST program
- could get you back. All you need do in make a slight modification
- to the assembler source VOLATILE routine that decides which bytes
- to consider volatile. Even a very junior MASM programmer could
- make that modification for you.
-
- If you use SSTOR, I suspect it makes it look as though it had
- modified CMOS. If you boot without the SSTOR driver, CMOS will
- appear to have changed because SSTOR is not doing its standard
- trickery.
-
- The TURBO setting is part of CMOS. If you accidentally turn
- turbo mode off, CMOS will appear to be changed, and CMOSCHK will
- complain. To clear the problem, set turbo back on and allow the
- CMOSCHK to restore CMOS.
-
- ***************************************************************
- ***************************************************************
- We repeat: CMOSREST won't do you a lick of good unless you run
- CMOSSAVE BEFORE you have trouble. Make sure you have copies of
- CMOS.SAV both on hard disk and on floppy.
- ***************************************************************
- ***************************************************************
-
- There is a companion program called BOOTSAVE that works in a
- similar way to protects your boot track from damage by rogue
- programs or viruses. Again, you must use it BEFORE you have
- trouble. When you register, I will send you a copy of BOOTSAVE,
- and REBOOT, which are useful adjuncts to CMOSSAVE.
-
- CMOSREST does not take effect until you REBOOT!!
-
- Verification Fire Drill
- ***********************
-
- CMOSSave and CMOSTRest have internal checks to warn you if they
- are not functioning. However, you can assure yourself they are
- working properly by using CMOSSave, then changing some minor
- setting in CMOS (e.g. to add an extra unneeded wait state), then
- use CMOSChk to detect the "damage" then CMOSRest to restore the
- CMOS back the way it was. If all is working correctly, the
- minor change should be undone.
-
- False Alarm CMOSCHK Corruption Messages
- ***************************************
-
- Some non-standard BIOSes have additional volatile portions that
- CMOSCHK does not know about. It will report false corruptions.
- There are three ways you can handle the problem:
-
- 1. Send us a screen print of what CMOSCHK is saying. We will
- send you a custom version with those false mismatches considered
- as volatile bytes. You must register if you want this service.
-
- 2. Modify the "VolatileList" line in CMOS.ASM yourself to
- include the extra offsets your BIOS is treating as volatile.
- Then reassemble. CmosChk.com will give you a list of offsets
- where it thinks there are mismatches. It is up to you to
- determine which ones you think are false alarms.
-
- 3. Simply avoid using CMOSChk. Just use CMOSSAVE and CMOSREST.
- Most of the time damaged CMOS is fairly obvious.
-
- Author
- ******
-
- CMOSSAVE, CMOSREST and CMOSCHK are copyrighted but may be freely
- used for any purpose except military.
- If you pass the files on, PLEASE PASS ON THIS DOCUMENTATION TOO.
-
- Please report bugs and problems to:
- Roedy Green
- Canadian Mind Products
- #601 - 1330 Burrard
- Vancouver BC Canada
- V6Z 2B8
- (604) 685-8412
-
- Electronic mail users can contact me via internet:
- roedy@bix.com
-
- Harvey Fishman wrote a pair of programs similar to CMOSSAVE and
- CMOSREST, but to the best of my knowledge, never released them.
-
- Support is available only to registered users.
-
- Shareware Status
- ****************
-
- CMOSSAVE CMOSREST and CMOSCHK are shareware. If you like them send
- $20 US or Canadian to:
-
- CMOSSAVE
- Roedy Green
- Canadian Mind Products
- #601 - 1330 Burrard
- Vancouver BC Canada
- V6Z 2B8
- (604) 685-8412
-
- Sorry we can no longer accept credit cards. The company was
- wiped out by criminals and we are just a thread of our former
- selves. Personal cheques are fine. Please make them payable to Canadian
- Mind Products.
-
- Please mention the program title since we sell many other
- products.
-
- We in return will send you the latest version complete with MASM
- source for CMOSSAVE, CMOSREST, CMOSCHK, REBOOT, BOOTSAVE,
- BOOTREST and BOOTCHK. We will also include a 1.2 MB or 1.44 diskette
- (please specify your preference) full of the source code for the
- complete CMP suite of other utilities.
-
- If you don't register, and continue to use CMOSSAVE, we will not
- do anything mean to you. We don't even want you to feel
- unusually guilty. It is theft, however. Your mom might not
- approve if she knew.
-
- Consider that if you DO register, that supports the creation of
- more shareware software such as this.
-
- Columnist Karen Kenworthy tells me CMOSSAVE has been downloaded
- over 10,000 times from America Online alone. So far we have received
- 27 registrations in total. CMOSSAVE is our most frequently
- registered utility. We have written scores of such utilities.
- You can see that shareware authors don't get rich, but
- distributors such as AOL and Compuserve do.
-
- SITE LICENSES
- *************
-
- If you wish a site license to use CMOSSAVE on multiple machines
- you can compute the cost using the following formula:
-
- Unit cost = $20 * sqrt( 1/n ) where n is the number of copies.
-
- Total cost = $20 * n * sqrt( 1/n ) rounded the nearest dollar if
- you wish.
-
-
- Average Incremental
- Copies Unit Cost Cost Total
-
- 1 $20.00 $20.00 $20.00
- 2 $14.14 $8.28 $28.28
- 3 $11.55 $6.36 $34.64
- 4 $10.00 $5.36 $40.00
- 5 $8.94 $4.72 $44.72
- 6 $8.16 $4.27 $48.99
- 7 $7.56 $3.93 $52.92
- 8 $7.07 $3.65 $56.57
- 9 $6.67 $3.43 $60.00
- 10 $6.32 $3.25 $63.25
- 15 $5.16 $2.63 $77.46
- 20 $4.47 $2.26 $89.44
- 25 $4.00 $2.02 $100.00
- 30 $3.65 $1.84 $109.54
- 40 $3.16 $1.59 $126.49
- 50 $2.83 $1.42 $141.42
- 75 $2.31 $1.16 $173.21
- 100 $2.00 $1.00 $200.00
- 200 $1.41 $0.71 $282.84
- 250 $1.26 $0.63 $316.23
- 500 $0.89 $0.45 $447.21
- 1000 $0.63 $0.32 $632.46
- 10000 $0.20 $0.10 $2,000.00
-
- Ten thousand copies is considered an unlimited site license.
-
- Unlimited licence would entitle you to a non-exclusive
- irrevocable worldwide licence to use, copy and distribute
- CMOSSAVE within your own organization. You would not have the
- right to sell it to other parties. Howvever, if you were a retailer, or
- manufacturer, it would give you the right to install it on any
- machines you sell. If you were a consultant, it would give you the
- right to install it on any machines you service.
-
- You may modify the source code to your own requirements, but the
- name and address of Canadian Mind Products must not be removed
- from the executable code COM file. However, our name and
- address need not display when CMOSSAVE is run. CMOSSAVE must be
- used for non-military purposes only.
-
- Please mail cheque, money order to:
-
- CMOSSAVE
- Roedy Green
- Canadian Mind Products
- #601 - 1330 Burrard Street
- Vancouver, BC
- V6Z 2B8
-
- Telephone (604) 685-8412
-
- Support is available only to registered users.
-
- -30-
-