Program SEERTC  README.TXT release 12th Dec 1999
------------------------------------------------

Purpose of program
------------------

This program allows you to view the Real Time Clock (RTC)
and DOS clock on your PC- the correct operation of these 
two clocks is essential to the correct functioning of 
your computer.  It is a read-only program that 
does not alter your setup in any way (however, no 
warranty or guarantees can be made- this is a free 
utility!) see licence.txt for disclaimers).  It is designed
to run in DOS to be used on a wide variety of computers 
running only DOS, or any version of Windows that can run a DOS box
and allows access to the RTC hardware.


Installation
------------
See Installation and Uninstallation Instructions below.

Status
------
Freeware

Distribution Status
-------------------
Freely distributable with provisos detailed in LICENCE.TXT

Contact Details
---------------
Colin Seymour
Email: netking@dircon.co.uk
Web page: http://www.users.dircon.co.uk/~netking/freesw.htm where any interim 
updates or bug information will be posted.


System Requirements
-------------------

This should run on practically anything from an IBM PC XT on.  However, 
the RTC information will only be available for machines of AT class 
and later.


Year 2000 Statement
-------------------

Naturally you would expect a Y2K checking program to be Y2K compliant.
It has been designed and tested to be as reliable as reasonably
possible in verifying Y2K clock settings. However, nothing is perfect, 
therefore you should excercise reasonable caution in using the results
from this program.  It is provided purely on a NO WARRANTY AS-IS basis
(see LICENCE.TXT).  No guarantee can be given regarding the performance 
or results obtained by using the software.  Bug reports and comments are 
welcomed, but replies and support services will not generally be provided.


About the Y2K date problem: Two Clocks
--------------------------------------

The PC contains two clocks - one is a built-in hardware clock usually in 
an embedded chip (real-time clock, or RTC).  This one keeps the time when the 
system is powered off.

The system clock (or DOS clock, or virtual clock) is set once from the RTC 
when the computer is turned on.  The correct functioning of this process 
is one of the most fundamental requirements for Y2K compliance. 

While it is still possible to read the RTC and use that, after boot-up,
as this program does, normally applications work exclusively from the system 
clock.

The operating system (e.g. DOS) maintains the system clock via a count 
updated at 18.2 times per second.  This count is converted to hours, minutes 
and seconds whenever the time is read.

If the RTC fails to work properly in Year 2000, any error may go un-noticed 
until your next re-boot or power-down/power-up sequence.

SEERTC may be found useful for checking the operation of the RTC and DOS 
clocks even if your machine is already believed to be compliant in the period 
after December 31st, 1999.  [A second opinion is often good to set your 
mind at ease!]


Further Information about the Real Time Clock
---------------------------------------------

Starting with the IBM PC AT, the CMOS memory chip (nowadays such functions 
are tending to be integrated with other chips or even the main processor
on single-chip embedded PCs) provided a Real Time Clock so that the date 
and time could be maintained after the PC was switched off.  A small 
battery or special capacitor provides power to the CMOS chip when the rest of 
the machine is off.  To conserve power so that this battery will last a long
time, the CMOS chip is designed to take very little current.  As a consequence
the number of registers available was limited.  Although most RTCs do include 
a century byte, a common problem is simply that the BIOS 
(Basic Input/Output System) fails to carry the lower two digits into the 
century digits as 99 changes to 00.  In the IBM PC AT, the Real Time Clock 
was provided by a Motorola MC146818A device.  The original AT had 64 CMOS 
memory registers, later AT compatibles had 128 registers, MCA systems added 
another 2K, EISA systems added another 8K.

RTC registers can be accessed directly through I/O ports, or through BIOS 
interrupts.  This program uses BIOS interrupts, as direct programming of the 
RTC is complicated and susceptible to problems.  For example, when the RTC 
is updating registers, time, date, and alarm data may be invalid and about 
1 in 500 reads of the RTC will have unpredictable and incorrect results.
It is necessary to disable interrupts, wait for RTC Register A bit 7
(Update in Progress) to go from high to low, and then read the desired clock
register within 244 microseconds.
The BIOS routines handle all this for you.  Nevertheless the BIOS routine 
may sometimes fail to read data (about 1 time every 500), so it is necessary,
when using the BIOS calls, to check the status returned in the carry flag and
re-try if it was set.

The RTC includes a "Day of Week" register.  This is generally not used by 
operating systems (which calculate the day of week separately), and may be 
incorrect even though DOS and higher levels of operating system have the 
correct day of week data.  Therefore, the CMOS day of week is not displayed
by SEERTC.

The location of the CMOS Date Century byte varies from system to system.
(e.g. ISA: 32H, MCA: 37H).  This is another reason why we should always 
use the BIOS interrupts to read the date.


Limitations
-----------

Extreme caution should be exercised during manual date testing, for example 
changing the date at the DOS prompt and viewing the result.

This could cause system dependent effects on software licenses which could
expire, passwords become invalidated, or automatic backup systems could 
delete files they consider expired.  Unless you are certain that there 
are no such functions on your machine, you should not change the date
manually.

Manual testing may not necessarily be capable of identifying the Time 
Dilation Syndrome, or Crouch-Echlin Effect.

Simply running SEERTC without changing the date should be safe, because 
it is a read-only application.

SEERTC will not identify any date problems in your operating system 
or applications, which run at levels above the DOS clock and RTC!

The Daylight Savings Flag may be set incorrectly and is a common problem
overridden by higher levels of software (see also below under
"Daylight Savings Flag").


The Crouch-Echlin Effect
------------------------

The Crouch-Echlin Effect causes the PC's time to shift progressively or 
randomly over a period of time and has been associated with the 244 
microsecond CMOS register reading window described above.
This effect is believed to be caused by incorrect reading of the RTC at 
boot-up, so there is a good chance that comparing the two clocks after each 
boot up using SEERTC will be sufficient to recognise its presence.

For further information:

http://www.pcc2000.com/y2kreport_12.5-cefull.html
A Detailed Report of The Crouch Echlin effect by Mike Echlin 

http://www.elmbronze.co.uk/tdtools/problem.htm
What is the Crouch-Echlin effect?

If you check the RTC and DOS clocks after re-boot for a valid current time,
you should be able to identify any time-shift due to this (or other
causes).  Note that a small time-shift could easily go unnoticed, 
resulting in problems eventually occurring after a number of 
re-boots.  Examining and comparing the two clocks directly
is therefore very useful.

To quote Mike Echlin:

"The original test to prove the existence of the effect is to set the 
date/time of your computer beyond rollover to year 2000, and set a 
control clock to the same time/date.

Then use the computer normally for 2 weeks, with the exception of assuring 
that the device is powered on/off once or twice a day by hand.

Every time the device is restarted, compare its time/date to the time/date 
of a control clock.

If there are any differences log them. These differences are the signs of CE"


Two simple tests that can be done without re-booting
----------------------------------------------------

This assumes you have opened a DOS box (or booted to DOS) and entered the
directory in which you installed the program.

Noting the cautions above, and backing up any application and data files of 
significance, you can set the date on your PC to December 31st, 1999, 
using the DOS DATE command, and the time to 23:59:30 using the DOS TIME
command.

Run SEERTC and watch the date and time displayed on the two clocks.
PCs with non-compliant BIOS will probably show something odd in
the RTC display as the time rolls over midnight.  My home PC (a 486) 
has an RTC that goes to 1900.  In my case, I need to reset
the date before powering down to ensure the correct date in the RTC.
Several different potential behaviours exist which will require different 
remedies; see references below for further information.

Exit by hitting ESC.  The DOS date and time will be unaffected by 
the RTC error, unless the DOS is itself non-compliant.  If you
now set the date back to a pre-Y2K date, this should restore 
the pre-Y2K RTC date and time correctly (you can check this 
by running SEERTC again).  Since you did not reboot, the system
was protected against the RTC error and you now have a chance 
to carry out further remediation.

Some faulty BIOSes are not Y2K compliant and cannot handle Y2K dates at all;
others suffer from problems only as 1999 changes to 2000.  By running
SEERTC frequently including every time after you re-boot, you can 
keep an eye on what is going on.

Check for the Y2K leap year calculation, which is the same procedure as 
above, except that you set the date to February 28th, 2000, and watch 
as midnight rolls over- it should then be February 29th, 2000.


Daylight Savings Flag
---------------------

SEERTC does display the Daylight Savings Time flag from the RTC.  However, 
note that the RTC in some computers uses the last Sunday in April as the 
start of Daylight Savings Time.  This may well be incorrect, and higher 
level operating systems such as Windows do their own management of 
DST, ignoring the RTC DST.


Reference web sites
-------------------

These sites are provided for information, but it is not possible to 
guarantee their reliability, safety or security.  You should take 
appropriate precautions against unsafe advice, software, viruses, etc.
and you are advised to seek the advice of a suitably qualified 
IT professional.

http://www.tyler.net/tyr7020/y2kinput.htm
Robert Hilliard's Year 2000 Date Crisis PC BIOS Page
(Includes some simple tests for Y2K problems)

http://www.bug2000.co.uk/
Action 2000 [UK Official Government Website]

http://www.iee.org.uk/2000risk/Welcome.html
The Millennium Problem in Embedded Systems [IEE]

http://www.mitre.org/research/y2k/docs/Y2K_LINKS.html
Other Links for the Y2K Problem [The MITRE Corporation]

http://www.firmware.com/support/bios/year2000.htm
The Y2K Date Rollover Problem on PC Systems [Micro Firmware Technical Support]
(Includes a free test utility)

http://www.y2kanswers.com/
Y2K Respuestas / Y2K Answers

http://www.chipcom.net/y2k.htm
Year 2000 Software & Resources [ChipCom.net]
(Includes a free RTC/BIOS test & fix utility, links to Microsoft updates, 
patches and tools)

http://www.y2ksavers.com/pages/resource.htm
Y2K Resources [silkmoth plc]

http://www.itpolicy.gsa.gov/mks/yr2000/y2khome.htm
U. S. Federal Government Gateway for Year 2000 Information Directories

http://www.bsi.org.uk/bsi/disc/year2000.html
DISC PD2000-1 A Definition of Year 2000 Conformity Requirements [British 
Standards Institution]

http://www.merlyn.demon.co.uk/date2000.htm
Y2K Page by Dr J R Stockton

http://www.microsoft.com/ithome/topics/year2k/default.htm
Microsoft Year 2000 Resource Center

http://www.nstl.com/index.html
NSTL [Year 2000 test services; Free x86 testing tool] (A division of 
McGraw-Hill)

http://www.club.innet.be/~year1451/y2k.htm
Y2K Computer Syndrome - Pierre Vriens [Introduction, Definition, Denial, 
Solution, Sites]

http://www.ispo.cec.be/y2keuro/
Year 2000 and euro: IT challenges of the century

http://www.year2000.com/
Year 2000 Information Center

http://www.itaa.org/2000cert.htm
ITAA's Year 2000 Certification Program

http://www.erols.com/steve451/main_y2k.htm
Impact of the Year 2000 Problem

http://www.y2kinfo.org/welcome.htm
A Y2K Information Homepage


Installation and Uninstallation Instructions
--------------------------------------------

SEERTC comprises a set of files.

The files will be supplied either as a Zip file which needs to be
unzipped using a suitable program, such as WinZip, PKUNZIP, Zip, PCUnzip,
Unzip, XTree Pro Gold, etc., or as the already unzipped set of files.

For version 1.0 the Zip file name is SEERTC10.zip
For subsequent versions a similar naming convention will apply.

(1) Create a directory (folder), e.g. C:\SEERTC, and copy all the files to it.
The files will easily fit on a floppy disk, if required, and SEERTC can be 
run from it.

If you download the Zip file you can download or move it to the directory
C:\SEERTC and unzip the files in that directory, then delete (or move to 
backup media) the Zip file.

After unzipping the files, SEERTC is then ready to run, and you can create an
icon or shortcut as described below.

A list of the files packed in the Zip file is given towards the end
of this file, together with instructions for uninstalling.


Setup Options for Windows 95 and later 
--------------------------------------

(1) Use Explorer and create a shortcut to your SEERTC.exe program:

Select the file, by using Explorer (Left-click the SEERTC application file).

Press the Right mouse button and drag the file to the Desktop, or to a Folder
on the Desktop.  At the prompt, select "Create Shortcut(s) Here".  

(2) You can also start Explorer, locate the file, and double click on it to 
run.

(3) Or use the Start button, select Run, and enter the full path to the 
program.

If you use Program Manager '95 (progman.exe) you can add an icon using File 
Manager '95 (winfile.exe) as described for Windows 3.x File Manager.


Windows 3.1x Setup
------------------

The simplest way to install an icon for the program is to find it in directory
\SEERTC using File Manager, click and drag the file from File Manager, to add
SEERTC.exe to the Windows program group of your choice.

Alternatively use the Program Manager menu (File/New/Program Item) to add the
.exe file to the currently selected program group, however you will need to
fill in the description (SEERTC), command line (C:\SEERTC\SEERTC.EXE) and
working directory (C:\SEERTC).

If you don't want an icon installed, you can run the SEERTC.exe program by
finding it in directory \SEERTC using File Manager, then double clicking on
it, or use the Program Manager menu (File/Run).


DOS Setup
---------

Create a directory using for example MD SEERTC
Copy the zip file to directory SEERTC using COPY or XCOPY.
(You may instead have downloaded the zip file already into the directory).
Unzip the zip file using a suitable unzip program.
With DOS in the directory, you run SEERTC by simply typing:
SEERTC
at the C:\SEERTC> or similar prompt.


Windows NT
----------

Testing may not be possible on systems under Windows NT as NT restricts 
applications from accessing hardware such as the RTC.


Dual Boot Systems
-----------------

The program can be run from the same installation directory equally well 
whether booted up in Windows 95+, 3+, or DOS (as it is a DOS application, 
there are no .ini files).


SEERTC File List
----------------

Essential application files:

readme.txt   This file

licence.txt  Licence conditions

FILE_ID.DIZ  A standard description file (to a format
             originally created by Clark Development)

seertc.exe   The Program

Source files in source.zip:

usubs.obj    Object code file
a.bat        Assembly batch file
seertc.obj   Object code file
seertc.asm   Assembly source file (Main)
usubs.asm    Assembly source file (Utilities)
l.bat        Linker batch file
mlbio.asm    DOS and ROM BIOS macros
mlprog.asm   Standard entry and exit procedures

Assembler source code is compatible with Microsoft Macro Assembler v1.0 or 
equivalents.  References:

Assembler: Arrow - MSDOS 16-bit MASM compatible assembler (Public domain)
Linker: Val - public domain MS Link compatible linker (Public domain)
Files arrowasm.zip and vallink.zip at ftp sites: 

ftp://ftp.univ-tlse1.fr/pub/pc/freedos/
ftp://ftp.dis.ulpgc.es/pub/msdos/utilidades/
ftp://ftp.uni-bayreuth.de/pub/vms/decus/vs0194/VMSLT97B/FREEPCDOS/

Assembler and linker in one zip file (older version):
ftp://ftp.simtel.net/pub/simtelnet/msdos/asmutl/valarrow.zip

See also:
Free Assemblers and Linkers - Developer City
http://chrisheng.hypermart.net/developer/asm.html
x86 Assembly Language FAQ - General Part 2/3 24. Shareware Assemblers
http://www.faqs.org/faqs/assembly-language/x86/general/part2/section-10.html


Uninstalling SEERTC
-------------------

To uninstall, delete all the files in the directory \SEERTC (or another
directory name if you changed its name), and delete the directory itself.

