Dec 192017
 
Verifies that your clock is working. For use in batch files.
File WHEN.ZIP from The Programmer’s Corner in
Category Batch Files
Verifies that your clock is working. For use in batch files.
File Name File Size Zip Size Zip Type
WHEN.ASM 4352 1863 deflated
WHEN.COM 384 270 deflated
WHEN.DOC 2427 952 deflated

Download File WHEN.ZIP Here

Contents of the WHEN.DOC file


Documentation For

W H E N

I have modified these files and this documentation to be more clear.
The original WHEN documentation is shown at the end of this file.

WHEN is a public domain program that checks for a properly operating
battery driven clock in the IBM PC. It always returns the date and time
(whether or not they are correct), but it also sets the errorlevel flag to 1 if
it finds a clock error. You would usually call WHEN from your AUTOEXEC.BAT file
as follows

|
| (blah, blah--batch file stuff)
|
cls
when
if not errorlevel 1 goto :dateok
echo The battery-driven clock is not working.
echo Set The correct date:
date
echo Now set the correct time:
time
:dateok
|
| (blah, blah--more batch file stuff)
|

The files you should have are:

WHEN.COM (the program)
WHEN.ASM (the source code)
WHEN.DOC (this file)

Here is the original documentation:

Time and Date Display & Check


This setup is used when you have a battery backedup clock.

You don't want to have to press return at the DOS time and

date prompts. (Besides, you probably already are using a

batch file.) Still, it is comforting to see the time and

date displayed when your system starts up.


Besides, eventually that battery is going to have run down.

If you are used to starting up without checking your time

and date, you may run a long time without noticing that your

files are all timestamped wrong.


Incorporate this AUTOEXEC.BAT file in your startup and rest

assured that you will be informed when the clock is dead. I

use an AST MegaPlus board and a CLOCK.SYS driver to go with

it. Any other way of initializing the DOS clock will work,

but the clock driver suites me best.


Stephen L. Billard
September, 1985



 December 19, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)