home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / ROM2.ZIP / ROM.MAN < prev    next >
Encoding:
Text File  |  1989-12-18  |  6.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.            User's Manual for ROM - CMOS Data Save and Restore Program
  13.  
  14.                                 ROM version 1.0
  15.                                December 18, 1989
  16.  
  17.                         Copyright 1989, Sydney M. Willett
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                      - 1 -
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                TABLE OF CONTENTS
  74.  
  75.  
  76.     TABLE OF CONTENTS ...................................... 2
  77.  
  78. 1.  DESCRIPTION ............................................ 3
  79.  
  80. 2.  DISTRIBUTION POLICY .................................... 3
  81.  
  82. 3.  OPERATION .............................................. 3
  83.  
  84.     a.  GENERAL ............................................ 3
  85.  
  86.     b.  COMMAND LINE OPTIONS
  87.  
  88.         (1)  ACTION ........................................ 4
  89.  
  90.         (2)  TIME .......................................... 4
  91.  
  92.         (3)  DATE .......................................... 4
  93.  
  94.         (4)  BOOT .......................................... 4
  95.  
  96. 4.  FOR THE PROGRAMMERS .................................... 4
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                      - 2 -
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. 1.  DESCRIPTION.
  140.  
  141.     a.  ROM is non memory resident program executed from the DOS command line
  142.     that will save the CMOS ROM configuration data of an AT class IBM or
  143.     compatible computer to a file, restore the CMOS ROM configuration data from
  144.     a file, set CMOS ROM and system time and date, and cold boot the computer.
  145.  
  146.     b.  This program was tested and worked correctly on every AT class computer
  147.     I could get my hands on.  While testing this program, I even purposely
  148.     messed up my CMOS ROM data so bad my computer didn't recognize my hard
  149.     drive.  All it took to restore my old CMOS ROM data was to run ROM.  This
  150.     is not to say there isn't a computer out there on which ROM won't run
  151.     correctly.  To the contrary, I'm certain there is at least one computer
  152.     which will burp on ROM.  As stated in the distribution policy, this is a
  153.     WYSIWYG (What You See Is What You Get) program whose only guarantee is its
  154.     unguaranteeability!
  155.  
  156.     c.  Turbo C version 1.5 and Turbo Assembler version 1.0 are trademarks of
  157.     Borland International.  These compilers were used to create this program.
  158.  
  159.  
  160. 2.  DISTRIBUTION POLICY.
  161.  
  162.     a.  ROM is hereby freely given to the Public Domain.  No fee is to be
  163.     charged for its use.
  164.  
  165.     b.  ROM is released "as is" with no implied warranty or guarantees.  The
  166.     author assumes no responsibility for any claims of damage incurred with the
  167.     use of this program.
  168.  
  169.     c.  ROM is to be distributed with the Turbo C source code and project file
  170.     (ROM.C and ROM.PRJ), the assembler source code and object module (BOOT.ASM
  171.     and BOOT.OBJ), the executable file (ROM.COM), and this manual (ROM.MAN).
  172.  
  173.  
  174. 3.  OPERATION.
  175.  
  176.     a.  GENERAL.
  177.  
  178.         (1)  ROM is a non memory resident program executed from the DOS command
  179.         line.  Several command line options are available.  All options can
  180.         operate singularly or with other options, except 'r' and 's' which may
  181.         not be used simultaneously.  When no options or an invalid option is
  182.         input, an error message and a help screen are displayed.  Below is the
  183.         help screen which summarizes the options.
  184.  
  185.             ROM [action] [time] [date] [boot]
  186.  
  187.               action - s           save CMOS ROM data to file
  188.                      - r           restore CMOS ROM data from file
  189.                 time - hh:mm:ss    24 hour time
  190.                 date - mm/dd/yyyy  month/day/year
  191.                 boot - b           cold boot the system after executing program
  192.  
  193.  
  194.  
  195.                                      - 3 -
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.         (2)  The program attempts to verify the integrity of the CMOS ROM data
  206.         written to and retrieved from a file before the data is used.  The
  207.         purpose of this program is to restore CMOS ROM configuration data in
  208.         the event of a calamity.  The last thing needed is to restore invalid
  209.         data.
  210.  
  211.     b.  COMMAND LINE OPTIONS.
  212.  
  213.         (1)  ACTION - A 's' input will save the CMOS ROM data to a file named
  214.                       CMOSROM.DAT.  The file is then compared with the CMOS ROM
  215.                       data to ensure integrity.  The file CMOSROM.DAT length is
  216.                       always 50 bytes.
  217.                     - A 'r' input will restore the data stored in the file
  218.                       CMOSROM.DAT to the CMOS ROM.  The program first checks
  219.                       for the existence of the file, then checks if the file
  220.                       length is 50 bytes.  Only after these checks are passed
  221.                       will the CMOS ROM be updated.  If a time option is not
  222.                       given on the command line, the program will update the
  223.                       CMOS ROM with the system time.  The date is updated in an
  224.                       identical manner.
  225.         (2)  TIME   - A time input in the 24 hour format hh:mm:ss, e.g.,
  226.                       12:00:00, will update the CMOS ROM and system time.
  227.         (3)  DATE   - A date input in the format mm/dd/yyyy, e.g., 12/18/1989,
  228.                       will update the CMOS ROM and system date.
  229.         (4)  BOOT   - A 'b' input will cold boot the system after the program
  230.                       executes all of the other options.
  231.  
  232.  
  233. 4.  FOR THE PROGRAMMERS.
  234.  
  235.     a.  Credit for this program is due largely to the column "Hardware Helper"
  236.     which appeared in the January 1990 issue of PCResource Magazine.  A Basic
  237.     program called RAM_CARE.BAS was listed which also saved and restored CMOS
  238.     ROM data.  I thought it might be interesting to write a similar program in
  239.     C with enhanced capabilities.  The result is ROM.
  240.  
  241.     b.  The key to the program is knowing which port assignments and bytes are
  242.     CMOS ROM data.  Port 70h sets up the CMOS ROM to send or receive data, with
  243.     bytes 14 through 63 being the CMOS ROM.  A little experimentation on my
  244.     part confirmed the only effect bytes 1 through 13 had was disastrous. 
  245.     Reading from port 71h reads in the existing CMOS ROM data.  Writing to port
  246.     71h replaces CMOS ROM data.
  247.  
  248.     c.  The integrated environment of Turbo C was used to write this program. 
  249.     A project file was used because I linked a small assembler object module,
  250.     BOOT.OBJ.  I couldn't find a C function, even an interrupt call, which
  251.     booted the computer satisfactorily.  The assembler program can be used to
  252.     either cold boot or warm boot the computer.  A function call BOOT(0) will
  253.     cold boot the computer while BOOT(1) will warm boot the computer.
  254.  
  255.     d.  Feel free to modify the source code.  My only requirement is you name
  256.     the resulting program something besides ROM.
  257.  
  258.  
  259.  
  260.  
  261.                                      - 4 -
  262.  
  263.  
  264.  
  265.