Dec 242017
 
A DOS Stop Watch utility 20KB.

Full Description of File


-!! !!-
-!! A DOS Stop Watch !!-
-! utility to time events !-
- SW.exe = StopWatch 2.00 -
-SW uses the computer clock to time events.-
-SW is accurate to 1/18.20 second. -
-SW needs under 20KB of memory. -
-SW times on program execution. -
-SW maximum count is over 32 hours. -
-!! !!-


File SW200MAR.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
A DOS Stop Watch utility 20KB.
File Name File Size Zip Size Zip Type
DISCLAIM.TXT 526 267 deflated
FILE_ID.DIZ 460 203 deflated
README.1ST 12888 3843 deflated
SHAREWAR.TXT 2557 1013 deflated
SUPPORT.TXT 1039 366 deflated
SW.C 4885 1343 deflated
SW.EXE 14046 8511 deflated
SYSOP.TXT 899 374 deflated

Download File SW200MAR.ZIP Here

Contents of the README.1ST file


-!! !!-
-!! A DOS Stop Watch !!-
-! utility to time events !-
- SW.exe = StopWatch 2.00 -
-SW uses the computer clock to time events.-
-SW is accurate to 1/18.20 second. -
-SW needs under 20KB of memory. -
-SW times on program execution. -
-SW maximum count is over 32 hours. -
-!! !!-












Stop Watch version 2.00

A DOS utility to time events









Table of Contents for
Stop Watch (SW):

A Support for Stop Watch
B Introduction to Stop Watch
C How to use Stop Watch
D Stop Watch Help screen
E Advantages of Stop Watch
F Results from Stop Watch
G Required Files
H Possible problems with Stop Watch
I Corrective Action with possible problems
J About Stop Watch
K The way Stop Watch works
L Measured Results for Crystal
M Graph of Crystal
N The DOS Tick
O Limits Explained
P Disclaimer
Q Credits for Stop Watch




A Support for Stop Watch

Please remember that Stop Watch 2.00 is not free software. Stop Watch is
Shareware. If you continue to use Stop Watch beyond the 21 day trial,
you must purchase Stop Watch.

Support and encourage your shareware programmer by sending:

$4.00

to:
Marco Ramos
3073 North Service Road
Burlington Ontario Canada
L7N 3G1


Supporters of Stop Watch 2.00 will be entitled to:
1) Make requests for other DOS utilities, by Marco Ramos.
2) Make suggestion for enhancing Stop Watch 2.0



B Introduction to Stop Watch


Stop Watch (SW.exe) is a DOS utility to time events.

SW is accurate to: 1.0 DOS Tick or roughly:

1/18.2 Second or about
54.9 Milli Seconds or
0.0549 Seconds




SW maximum limits: 2,147,483 DOS Ticks or about:

117,993.57 Seconds
1,966.56 Minutes
32.78 Hours
1.37 Days



C How to use Stop Watch


Issue the SW command first followed by your usual DOS command,
to a maximum of 128 characters.

SW command [parameters] [switches]
Examples:
SW VER
SW CLS
SW DIR
SW DEL *.BAT
SW COPY C:\TEMP\*.* D:\TEMP /V
SW CHKDSK
SW CHKDSK D:
SW XCOPY C:\TEMP\*.* D:\TEMP /S/E/V
SW WP.EXE
SW MENU.BAT
SW then type EXIT at DOS prompt.
SW ?



D Stop Watch Help screen


There are 6 ways to display Help for Stop Watch 2.0

SW ?
SW h
SW H

SW /?
SW /h
SW /H











E Advantages of Stop Watch


1) Displays results in two formats:
- Seconds and
- Minutes & Seconds

2) Pass up to 128 characters as parameters

3) Automatically exits TSR mode ie. SW ver

4) Manually exits TSR mode ie. SW , then type
EXIT

6) Times internal DOS commands, like (DIR, COPY, CLS)

7) Times external DOS commands, like (CHKDSK, XCOPY)

8) Times programs .COM .EXE .BAT




F Results from Stop Watch

For example, at the DOS Prompt you type in SW CHKDSK D:


41906176 bytes total disk space
2048 bytes in 1 hidden files
190464 bytes in 88 directories
35213312 bytes in 1421 user files
6500352 bytes available on disk

2048 bytes in each allocation unit
20462 total allocation units on disk
3174 available allocation units on disk

655360 total bytes memory
598336 bytes free

Stop Watch rev. 2.00 0.65 Second(s) or
Marco Ramos (c) May 1993 0 Minute(s) 0.65 Second(s)



G Required Files


SW200MAR.ZIP
pkZIP compression utility 2.04G
MARco ramos - programmer
version 2.00
Stop Watch


The 'zipped' or compressed file will contain:

README 1ST This ASCII file/manual.
SW C Source listing of C program.
FILE_ID DIZ ASCII file, BBS file description.
SW EXE Stop Watch executable.
DISCLAIM TXT ASCII file for Disclaimer.
SHAREWAR TXT ASCII file describing Shareware.
SUPPORT TXT ASCII file for asking for $4.00
SYSOP TXT ASCII file for System Operators of BBS.



H Possible problems with Stop Watch


None. Stop Watch (SW.exe) works GREAT !!!

So if there are any odd things happening then, it must be the
the other persons TSR (Terminate & Stay Resident) program or the
other persons Device Driver. < ha! >

Well, if you want another story.....

SW has on occasion come up with negative numbers, like:

-0.65 Second(s) or
0 Minute(s) -0.65 Second(s)


But this was later traced to the Executable say (XXX.exe) .
XXX.exe actually changed the DOS time stamp! See next screen.




I Corrective Action with possible problems


Action:

If you get SW.exe with a negative number, then try:

1) Writing the following batch file, with MS-DOS 5.0

2) This will isolate the executable XXX.exe that is
changing the DOS time stamp and NOT SW.exe

@Echo Off
Echo. | Time > C:\Temp\TimeTest.Txt
XXX.exe
Echo. | Time >> C:\Temp\TimeTest.Txt

3) Note the start & stop times in TimeTest.Txt





J About Stop Watch


One fine day David ask Marco for a simple program to time events.
Marco was new to programming with C and happily took up the challenge.

Stop Watch (SW.exe) is Written in C using Borland 3.1 libraries.

SW Revision 1.00 thru 1.03 where never released publicly. They
where our experimental versions. We added more features, like:

- Passing more than 1 parameter to SW
- Compiling with different Memory Model (Tiny, Small, Large, Huge)

SW rev. 2.00 was complied using Borland 3.1 C++ large memory model.








K The way Stop Watch works


1) Stores DOS time into a variable called start_time

2) Reloads Command.com (as a 2nd command processor)

3) Are there any parameters being passed to Stop Watch (SW) ?

If Yes, then executes parameters passed under the 2nd command processor,
then automatically exits the 2nd command processor,
then SW stores DOS time into a variable called stop_time,
then calculates and displays the elapsed time.

If No, then executes parameters typed under the 2nd command processor,
then manually exit the 2nd command processor by typing EXIT
then SW stores DOS time into a variable called stop_time,
then calculates and displays the elapsed time.





L Measured Results for Crystal


14.31818MHz Crystal
from an IBM compatible 80386 motherboard:


14.31818 MHz Crystal




Rated Speed Measured Speed Error
MHz MHz

14.31818 14.3183 0.0008%

Crystal Output: Sinusoidal Waveform
2.5 Volts Peak
5.0 Volts Peak to Peak



M Graph of Crystal



14.3183 MHz Crystal
from an IBM compatible 80386 motherboard:


Volts +2.5 * *
* *
* *
* *
0.0 *** Time (nano Seconds)
* *
* *
* *
-2.5 * *


69.84




N The DOS Tick


18.20 DOS Ticks/second
1 DOS Tick = 0.0549 Seconds

SW is based on the DOS clock and the DOS clock is based on a crystal:
Note the crystal on the mother board is rated at 14.31818 MHz.

14.31818 MHz = 14,318,180 Hertz, then divide by 3

4.77272 MHz = 4,772,727 Hertz, (Remember the old XT speed !)
Now divide by 4

Now divide by 65,536 = 2^16

18.20651 Hz which is approximated to:

18.20 DOS Ticks/second




O Limits Explained


SW maximum limits = 2,147,483 DOS Ticks (over 32 hours).

Too save on memory usage, (about 20KB versus 80KB) we chose to use
integers versus floating point. Thus we have the maximum register size of:

2^31 = 2,147,483,648 then divide by 1,000
= 2,147,483.


Why divide by 1,000 ?
Because we chose to use intergers.
Stop Watch counts the DOS ticks and divides by 182 instead of 18.20,
thus a factor of 10. And we chose to display 2 numbers after the
decimal point, thus, a factor of 100.
Thus, a factor of 10 x 100 = 1,000





P Disclaimer


DISCLAIMER OF WARRANTY


Stop Watch is sold without any expressed
or implied warranties whatsoever.


The user assumes the entire risk
of using this program.


The programmer and any assistants will not
be held liable for any damages direct or
consequential, caused through the use of this program.






Q Credits for Stop Watch







Programmer: Marco Ramos

Assistant Programmer: Scott Mitchell

Technical Writer / Tester: David Wilson C.E.T.




















Stop Watch version 2.00










 December 24, 2017  Add comments

Leave a Reply