home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT045.ZIP
/
UTILS.EXE
/
READ.ME
< prev
next >
Wrap
Text File
|
1989-09-17
|
64KB
|
2,129 lines
EISSINGER UTILITIES
Version 2.0a
Copyright 1989, Michael A. Eissinger
All Rights Reserved.
EISSINGER UTILITIES
2 License Statement
This software is protected by both United States Copyright
Law and International Treaty provisions. Therefore, all
conditions pertaining to other publications also apply to
this software, with the following exceptions. The licensee
of this software may make archival copies of this software
for the sole purpose of backing up this software and
protecting the licensee's investment from loss.
This version of this software is released as "Shareware".
As such, the user may also make copies of the software and
relating documentation and distribute those copies freely as
long as no changes are made to either the software or
documentation and as long as no amount above the cost of
producing the physical copy (not to exceed $10.00) is
charged for the copy of the software and documentation. The
software must also be distributed with the relating
documentation attached and the package must be distributed
as a single package.
If the user uses the software regularly, he/she is required
to register directly with the owner of the Copyright -
Michael A. Eissinger, Microcomputer Consultant, 345 East
Cedar, Hanford, CA 93230 - 209-582-5830. Registration
includes a free update to the latest version of the
software, free periodic updates for one year, printed
documentation and free phone support. Unregistered users
can not get any support, whatsoever.
3 Warranty
Michael A. Eissinger, Microcomputer Consultant specifically
disclaims all warranties, expressed or implied, including
but not limited to implied warranties of merchantability and
fitness for a particular purpose, and the program license
granted herein in particular and without limiting operation
of the program license with respect to any particular
application, use or purpose. In no event shall Michael A.
Eissinger, Microcomputer Consultant, or employees or agents
of Michael A. Eissinger, Microcomputer Consultant be liable
for any loss of profit or any other commercial damage,
including, but not limited to, special, incidental,
consequential or other damages.
This statement shall be construed, interpreted and governed
by the laws of the State of California.
10:19pm Sep 17,1989 Eissinger Utilities Page: 2
EISSINGER UTILITIES
4 Introduction
Even though many users new to personal computers are opting
to stay away from the DOS command line in favor of
"environments" such as MS-Windows, DeskView, Presentation
Manager or others, others still rely on batch files and the
DOS prompt for many functions. This set of utilities is
designed for those who use the command line and for system
integrators, consultants or anyone setting up or using a
system. These utilities add a rich variety of DOS commands
for everything from making your batch file displays pretty
to checking the system hardware and configuration.
With a few exceptions each of these utilities has been
designed to do one function. Many of them are only useful
when used within a batch file, in fact they're intended to
be an extension of the batch programming language and
provide functions that have not been available before. Some
of these utilities are alterations of existing DOS commands,
some are based loosely on utilities available in UNIX,
others are just functions that the author wanted or needed
for a specific purpose.
There are several broad groupings within this package. The
batch commands can position the cursor on the screen, change
the color of the screen, clear a portion of the screen,
display text on the screen, prompt the user for a response
and branch within a batch file based on the user's response
or display the date and time in a variety of formats.
The batch file building utilities can build a batch file
from a wild card specification, paste two files together or
interleave lines from two files to form a new file.
The text file utilities can change the case of all of the
text in a file or list sections of a text or source code
file.
The system utilities report on a variety of
hardware/software options and can report on the current
configuration of a system.
The Pascal utilities can help any Pascal programmer better
document and maintain source code.
This is version two of this utility package. Version one was
intended primarily for Turbo Pascal programmers and included
several batch commands and utilities. This version still
carries most of the programmer's utilities, however the DOS
utilities have been expanded to the point that this is no
longer a set of programmer's tools.
10:19pm Sep 17,1989 Eissinger Utilities Page: 3
EISSINGER UTILITIES
One thing that has been left out of this version that was in
version one is the support for displaying work files
produced by Screen Genie from Nostradamus Software. The
conversion and test utilities and the display TPU have been
eliminated, since Nostradamus now includes support for Turbo
Pascal versions 4.0 and 5.0/5.5.
Technical Notes: These utilities were all written using
Turbo Pascal, Version 5.5 from Borland International. Some
of these utilities include routines provided within various
packages from Turbo Power, including Turbo Professional and
Turbo Filer. All other code was written by the author and
includes no public domain or shareware code from other
sources, other than that mentioned above.
These utilities are distributed in a compressed format.
This insures that they will be kept together as a set on
bulletin boards and that they will be quicker to down-load
from bulletin boards, since they take up much less space in
the compressed format.
10:19pm Sep 17,1989 Eissinger Utilities Page: 4
EISSINGER UTILITIES
5 Getting Started
All of the files that make up the system are stored within a
compressed file called UTILS.EXE . . . this is a self-
extracting utility and no other program is needed to
uncompress the files contained within UTILS.EXE. To
unarchive these, copy UTILS.EXE to your DOS or Utility
directory (or any directory on the system path) and type
UTILS, followed by tapping [Return]/[Enter].
You can delete the UTILS.EXE file once everything has been
unarchived.
This list of files includes the utilities that you should
have following the unarchiving process.
READ .ME
CLOCK .BAT
GRMENU .BAT
BLDBAT .EXE
BORDER .EXE
CASE .EXE
CLRABOVE.EXE
CLRBELOW.EXE
CLRBOX .EXE
CLRLINE .EXE
COLOR .EXE
EKO .EXE
EXTRACT .EXE
GETRESP .EXE
GETYN .EXE
HWARE .EXE
INDENT .EXE
KURSOR .EXE
MELD .EXE
NOW .EXE
PASTE .EXE
PAUSEC .EXE
PUTCURS .EXE
TODAY .EXE
TONE .EXE
TYP .EXE
MEMCHK .EXE
GRMENU .TXT
HEAD .EXE
TAIL .EXE
MAINLINE.EXE
Typing the name of the utility, followed by a question mark
[?] will display help, including syntax for each of the
commands.
10:19pm Sep 17,1989 Eissinger Utilities Page: 5
EISSINGER UTILITIES
6 DOS/System Utility Programs
The Eissinger Utilities now contains a rich array of utility
programs some of which are intended for use within batch
files, others are system level utilities.
6.1 HWare
Hardware/Configuration Examination Utility
This program checks as many of the system parameters as
possible and produces a report to either the screen or the
system printer. For people doing system configuration,
technicians or others needing to know how a particular
system is configured, HWare can be an extremely useful tool.
Some of the things that HWARE.EXE reports are . . .
6.1.1 System CPU & Math Coprocessor
HWare can determine the processor installed in the system,
if it is one of the following CPUs...
8088
8086
V20
V30
80188
80186
80286
80386
HWare will also report the presence of a Numeric Coprocessor
if one of the following processors is installed . . .
8087
80287
80387
If No Coprocessor is detected, HWare will report . . .
"No intel Numeric Coprocessor Detected"
Currently no support is provided for the 80486/80487
processors.
6.1.2 System Date/Time
HWare will report the date and time as detected from the
system clock.
10:19pm Sep 17,1989 Eissinger Utilities Page: 6
EISSINGER UTILITIES
6.1.3 Conventional Memory
Conventional memory is tricky to read, since in order to do
it HWare has to be loaded into memory. Every attempt has
been made to adjust for the existance of HWare when testing
the total amount of conventional memory installed on the
system, however it is best to take this number as a very
close approximation of the actual memory available after
the system is booted.
6.1.4 EMS - Expanded Memory
HWare will accurately report the total amount of EMS memory
installed, allocated and the number of available handles if
EMS memory is installed on the system.
6.1.5 Extended Memory
If HWare encounters Extended Memory it will accurately
report the total amount of Extended memory installed and the
amount of Extended memory available for use.
6.1.6 Computer
On some computers made by Zenith or Compaq HWare can detect
the brand name of these computers. HWare can not detect the
brand name on all models from either of these manufactures,
however on some models it will include either "Zenith Brand
Computer" or "Compaq Brand Computer" in the report.
6.1.7 ComSpec, Path, Prompt
HWare will accurately report any ComSpec, Path and/or Prompt
installed.
6.1.8 Video Adapter
HWare can accurately detect many of the most popular video
adapters available at the time of the creation of HWare.
As new standards are introduced, HWare will be updated to
include those standards. Those adapters currently
supported include Hercules, CGA, MCGA, EGA, VGA and PGC.
6.1.9 Verify/Break
HWare will report if the Disk Write Verify flag and the
Control Break flag are ON or OFF.
6.1.10 Toggle Key Status
Hware automatically detects and reports the status of the
toggle keys on the keyboard, including Num Lock, Scroll Lock
and Caps Lock.
6.1.11 Mouse
If HWare detects the presence of a mouse on the system, that
status will be included in the report. HWare makes no
destinction as to the type of mouse (two or three button).
10:19pm Sep 17,1989 Eissinger Utilities Page: 7
EISSINGER UTILITIES
6.1.12 Enhanced Keyboard
If the system is equipped with an enhanced keyboard HWare
may detect it's presence. HWare can accurately detect an
enhanced keyboard on PS/2's, however it can not always
detect enhanced keyboards from other manufactures. HWare
will never report that a system does include an enhanced
keyboard if there is not one installed.
6.1.13 SideKick
When examining memory, HWare checks for the presence of
SideKick from Borland International. The only reason to
check for SideKick is to prevent loading any TSR's after
SideKick.
6.1.14 Multi-Tasker
HWare will detect and report the presence of some Multi-
Tasking software, specifically QuarterDesk's DeskView, IBM's
TopView and/or OmniView. Hware does not determine which of
these products is loaded, only their presence.
6.1.15 DOS Print Spooler
If the memory resident print spooler provided with most
versions of DOS (PRINT.COM) is loaded into memory prior to
running HWare, it's presence will be detected and reported.
HWare can not detect spoolers or print buffers other than
the standard DOS PRINT.COM.
6.1.16 Printer Ports
HWare currently only supports the LPT ports 1 and 2 and will
report their status. If a printer is attached to either of
these ports and on-line, HWare will report that the printer
is on-line. There is no support in this version of HWare
for serial printers or other devices attached to the COM
ports.
6.1.17 Network
Networks are becoming more and more common within the PC
world. HWare can help determine which network, if any, is
currently installed on the system. HWare can detect the
presence of Share, Novell NetWare and/or the NetBIOS, or any
networks that look to the system like one of those three.
6.1.18 Disk Drives
HWare does a complete examination of each disk drive
installed on the system, including all floppies, hard disks,
Bernoulli removable drive and/or RAM disks. This includes
any drives that are set up as phantom drives -using
DRVPARAM. HWare reports if a drive is installed, the type
of drive, the bytes per sector, bytes per cluster, the total
capacity of the drive, the amount of free space on the drive
and the currently logged drive.
10:19pm Sep 17,1989 Eissinger Utilities Page: 8
EISSINGER UTILITIES
6.1.19 Running HWare
HWare has only two operating options: Report to the Screen,
or Report to the Printer.
Syntax: HWARE (sends output to screen)
HWARE /p (sends output to printer)
HWARE ? (displays help screen)
When sending output to the screen, all of the system
parameters, except the drive information should fill one
screen. HWare will prompt you to tap a key to continue
before it goes onto the next screen which will report on all
of the drives installed on the system. If you want to abort
before running through the drives, [Ctrl][C] will abort at
that prompt.
When running HWare you don't need to have floppies loaded
into every drive, however it will run much faster if you do.
HWare will have to wait for a time out if there is no disk
present. If the system is configured with phantom drives
the system will prompt you to insert a disk into the drive
and tap a key to continue. With phantom drives you will
have to tap a key before HWare will continue, thus wiping
out the possibility of running HWare unattended on these
systems.
The following is a copy of a typical HWare report. The
comments enclosed in curly brackets ({}) are not included in
the report.
10:19pm Sep 17,1989 Eissinger Utilities Page: 9
EISSINGER UTILITIES
6.1.20 Example
HWare - Copyright 1989, Michael A. Eissinger, All Rights Reserved
-----
System Hardware/Configuration Utility
CPU = Intel 80286
Math Coprocessor= No Coprocessor installed
Current Date = Sun 9-03-1989
Current Time = 7:21:01 am
DOS Version = 3.30
Comspec = C:\COMMAND.COM
Path = D:\BIN;D:\BIN\EXTRAS;C:\TURBO;C:\PCWRITE;D:\;C:\
Prompt = { no prompt installed on system }
Current Display = CGA
Mouse Installed
LPT1 is On-Line
Scroll Lock = ON
Caps Lock = ON
Num Lock = ON
483440 bytes of RAM Available
EMS Memory Detected
393216 bytes of EMS Memory installed
262144 bytes of EMS Memory available
2 EMS Handles active
DOS Print Spooler Installed
Share Installed
DISK INFO:
Drive A: { 1.2mb drive }
Sector = 512 Cluster = 512 Capacity = 1213952 Free = 706560
Drive B: { 720k floppy }
Sector = 512 Cluster = 1024 Capacity = 730112 Free = 668672
Drive C: { 20mb hard disk }
Sector = 512 Cluster = 1024 Capacity = 21274624 Free = 3246080
Drive D: { 40mb hard disk }
Sector = 512 Cluster = 1024 Capacity = 42608640 Free = 4767024
Drive E: { small RAM disk }
Sector = 128 Cluster = 128 Capacity = 62592 Free = 62592
Drive F: { phantom of drive a: with 360k floppy mounted }
Sector = 512 Cluster = 1024 Capacity = 362496 Free = 168960
Drive G: { phantom of drive b: }
Sector = 512 Cluster = 1024 Capacity = 730112 Free = 668672
Current Drive = C:
10:19pm Sep 17,1989 Eissinger Utilities Page:10
EISSINGER UTILITIES
6.2 MemChk
MEMCHK is a memory reporting utility that can be used from
the command line or within a batch file to report the amount
and type of memory available on the system. Like the memory
reporting functions within HWARE.EXE above, the
conventional memory report should be close, however it might
be just a little off due to the way MEMCHK examines memory
when it is loaded. The Extended and EMS memory reporting
routines are as accurate as possible and will report the
exact amounts of memory available on the system.
Syntax: memchk
10:20pm Sep 17,1989 Eissinger Utilities Page:11
EISSINGER UTILITIES
7 Batch File Utilities
Most of the programs making in the Eissinger utilities are
for use with batch files. There ar two general types of
utilities for batch files. The first type is programs that
are tools to help the batch programmer build batch files.
Some of these are inspired by commands and features from the
UNIX world. The second type of batch oriented utilities are
commands that make up an extension of the batch programming
language. Many of these additional commands not available
from other sources.
7.1 Batch File Building Utilities
The real power of MS-DOS can be harnessed when the user
becomes proficient in writing DOS batch files. These
utilities are designed to help make that process easier by
providing tools to automate much of the actual assembly of a
batch file.
7.1.1 BldBat
BLDBAT builds a skeleton batch file from a list of files,
given a file spec, a batch file name and optional strings
for leading and trailing the file name. BLDBAT provides
some of the functions of the UNIX ls command.
SYNTAX:
BLDBAT <filespec> <batchfile> <+lead> <-trail>
where <filespec> is any valid DOS file mask
(wildcards ok)
<batchfile> is the name of the batch file to
build
<+lead> is any text to insert on each
line prior to the file name.
The [+] (plus) is required to tell
it that this is leading text.
The lead string can not contain any
spaces.
<-trail> is any text to insert on each line
following the file name. The [-]
(minus) is required to tell it that
this is trailing text. The trail
string can not contain any spaces.
10:20pm Sep 17,1989 Eissinger Utilities Page:12
EISSINGER UTILITIES
7.1.2 Meld
Meld is a file combine utility. MELD takes two input files,
reading one line from each at a time and writing them, one
following the other to the output file. This is much like
shuffling a deck of cards.
Syntax:
MELD <infile1> <infile2> <outfile>
where <infile1> is the first file read, and subsequently
will be the first line of each line pair.
<infile2> is the second file read, and subsequently
will be the second line of each line pair.
<outfile> is the resulting melded file.
example:
if infile1 contains the following lines . . .
file one line 1
file one line 2
file one line 3
.
.
.
file one line 99
and infile2 contains the following lines . . .
file two line 1
file two line 2
file two line 3
.
.
.
file two line 99
Then outfile will look like this
file one line 1
file two line 1
file one line 2
file two line 2
file one line 3
file two line 3
.
.
.
file one line 99
file two line 99
10:20pm Sep 17,1989 Eissinger Utilities Page:13
EISSINGER UTILITIES
7.1.3 Paste
PASTE provides a function somewhat like the UNIX paste
command, like meld, it combines the contents of two files,
producing a third file, however instead of writing separate
lines, PASTE concatenates the corresponding lines, so that
the resulting file contains the same number of lines as the
longest of the two infiles. Additionally, PASTE offers the
optional ability to specify leading, trailing and
connecting text.
Syntax:
PASTE <infile1> <infile2> <outfile> <+ld> </mid> <-trl>
where <infile1> is the first input file and will give the
text that is first on each line.
<infile2> is the second input file and will give the
text that is second on each line.
<outfile> is the resulting text file.
<+ld> is any leading text to place at the
beginning of each line in outfile. The
[+] (plus) is required to specify that this
is leading text and it can not contain any
spaces.
</mid> is any text to be placed between the text
from the first and second files in the
outfile. The [/] (slash) is required to
specify that this is connecting text and
it can not contain any spaces.
<-trl> is any text to be placed at the very end of
each line in the outfile. The [-] (minus)
sign is required to specify that this is
trailing text and it can not contain any
spaces.
Note: leading, connecting and trailing text is completely
optional and can be in any order, since their placement
within the resulting outfile is determined by the [+], [/]
and [-] characters. These characters are stripped from the
text prior to writing the outfile.
10:20pm Sep 17,1989 Eissinger Utilities Page:14
EISSINGER UTILITIES
Example: lets examine the results of the following command
line...
PASTE infile1 infile2 outfile +copy /\hold\
if infile1 contains the following lines . . .
file11
file12
file13
.
.
.
file19
and infile2 contains the following lines . . .
file21
file22
file23
.
.
.
file29
Then outfile will look like this
copy file11 \hold\ file21
copy file12 \hold\ file22
copy file13 \hold\ file23
.
.
.
copy file19 \hold\ file29
Notice that there is a space following the \hold\ connecting
text. PASTE automatically inserts that space. In this
instance It must be edited out before the resulting batch
file can be executed.
By combining the power of BLDBAT, MELD and PASTE, you can
generate quite useful and powerful batch files with the
least amount of actual editing.
10:20pm Sep 17,1989 Eissinger Utilities Page:15
EISSINGER UTILITIES
7.2 Batch Language Extensions
The next section of utilities work on the screen during
batch file execution to make screen displays so slick that
most people won't know that you're at the DOS prompt, not
running an application.
7.2.1 Kursor
Change the cursor state.
Syntax: KURSOR = restore to normal cursor
KURSOR on = restore to normal cursor
KURSOR off = turn cursor off, hidden cursor
KURSOR fat = change to fat cursor
KURSOR block = change to block cursor
7.2.2 PutCurs
Puts the cursor on a particular line on the screen and
optionally clears the entire screen, leaving the cursor on
the specified line.
Syntax: PUTCURS nn /c
where nn is a valid screen row (can not be 1)
/c clear the screen (optional)
10:20pm Sep 17,1989 Eissinger Utilities Page:16
EISSINGER UTILITIES
7.2.3 Screen Clearing
DOS only provides CLS to clear the entire screen during
display within a batch file. The next set of utilities
provides a range of screen clearing options from a single
line to a box. These utilities also take into account the
current screen attributes so they are a perfect compliment
to the COLOR command discussed later.
7.2.3.1 ClrAbove
Clears above and including the screen line specified.
Syntax: CLRABOVE <nn>
where <nn> is any valid screen row
7.2.3.2 ClrBelow
Clears below and including the screen line specified.
Syntax: CLRBELOW nn
where nn is any valid screen row
7.2.3.3 ClrBox
Clears a box on the screen
Syntax: CLRBOX x y h w
where x is the x screen coordinate
y is the y screen coordinate
h is the height of the box
w is the width of the box
7.2.3.4 ClrLine
Clears a single line on the screen
Syntax: CLRLINE nn
where nn is any valid screen row
10:20pm Sep 17,1989 Eissinger Utilities Page:17
EISSINGER UTILITIES
7.2.4 Color
Clears the screen and changes the color of the screen
display.
Syntax: COLOR n1 n2
where n1 is the foreground color number
n2 is the background color number
valid colors . . .
black = 0 blue = 1 green = 2
cyan = 3 red = 4 magenta = 5
brown = 6 light gray = 7 dark gray = 8
light blue = 9 light green = 10 light cyan = 11
light red = 12 light magenta = 13 yellow = 14
white = 15
Note: many of the display commands built into DOS - pause,
echo, type, etc... make no distinction as to the color on
the screen, so they will always make their display in white
characters on a black background. PAUSEC.EXE, EKO.EXE and
TYP.EXE included with this set of utilities corrects this
problem on most systems.
7.2.5 Border
Changes the color of the border around the screen display.
Syntax: BORDER n n2
where n is the color number
valid colors . . .
black = 0 blue = 1 green = 2
cyan = 3 red = 4 magenta = 5
brown = 6 light gray = 7 dark gray = 8
light blue = 9 light green = 10 light cyan = 11
light red = 12 light magenta = 13 yellow = 14
white = 15
10:20pm Sep 17,1989 Eissinger Utilities Page:18
EISSINGER UTILITIES
7.2.6 Typ
TYP adds a couple of features to the normal DOS TYPE
command.
Color
TYP uses the current screen attributes for type. On some
display adapter/monitor combinations, TYPE will always
display white text on a black background. This is not all
that desirable when using the COLOR.EXE command. TYP
corrects this limitation of the original TYPE command and
uses the current screen attributes for display.
Pause
TYP automatically pauses after one full screen of text, and
at the end of the text file. This means that within a batch
file, several screens of instructions can be displayed, and
the user does not have to attempt to pause the screen as the
text flies by.
Case
TYP can display the text as it was originally entered into
the text file, or it can optionally convert all text to
either upper or lower case.
Note
Unlike TYPE, TYP can not be used to redirect a file to the
printer, a file or other device. TYP is strictly intended
to display text on the system's monitor.
Syntax: TYP <infile> /option
where <infile> is the text file.
/option is the case option.
/u = upper case
/l = lower case
7.2.7 PauseC
This utility is used exactly like the resident DOS command
PAUSE. However, PAUSEC checks the current screen attributes
(color & intensity) and uses those attributes for the pause
display. On some display adapter/monitor setups the DOS
PAUSE will only display white characters on a black
background. This can present ugly displays when used with
the COLOR.EXE command.
10:20pm Sep 17,1989 Eissinger Utilities Page:19
EISSINGER UTILITIES
7.2.8 Eko
Unlike ECHO, which displays text specced on the line within
the batch file, EKO uses an external text file. Instead of
telling EKO the text to be displayed, EKO uses the line
number of the text within the secondary text file. EKO can
also optionally alter the case of the text to be displayed
to either all upper or all lower case. EKO can be useful
when using text several times for display within the same or
different batch files.
Syntax: EKO <infile> nn /option
where <infile> is the text file.
nn is the line of text within the file
to display.
/option is the case option.
/u = upper case
/l = lower case
10:20pm Sep 17,1989 Eissinger Utilities Page:20
EISSINGER UTILITIES
7.2.9 User Response Batch Entry Utilities
Another function missing from MS-DOS is the ability to
accept user input during batch execution. The next two
utilities provide some level of user entry. Both allow the
user to tap a single key and then the batch program can
branch based on the key tapped.
7.2.9.1 GetResp
Display a prompt on the screen and wait for a key to be
pressed. The result of the keypress is returned in DOS's
ErrorLevel and can be checked in a batch file. GetResp will
only function with the letters A - Z and digits 0 - 9.
Consult the GRMENU.BAT file for an example of how to use
GETRESP.EXE.
The following is a complete list of characters and the
resulting ErrorLevels.
C EL C EL C EL C EL C EL
------ ------ ------ ------ ------
0 = 48 1 = 49 2 = 50 3 = 51 4 = 52
5 = 53 6 = 54 7 = 55 8 = 56 9 = 57
A = 65 B = 66 C = 67 D = 68 E = 69
F = 70 G = 71 H = 72 I = 73 J = 74
K = 75 L = 76 M = 77 N = 78 O = 79
P = 80 Q = 81 R = 82 S = 83 T = 84
U = 85 V = 86 W = 87 X = 88 Y = 89
Z = 90
7.2.9.2 GetYN
Like GetResp, displays a prompt and waits for a key to be
pressed, however GetYN only responds to [Y] or [N],
returning 1 in ErrorLevel if [Y], 0 if [N], all other keys
have no effect and GetYN will wait until either [Y] or [N]
is pressed.
10:20pm Sep 17,1989 Eissinger Utilities Page:21
EISSINGER UTILITIES
7.2.10 Time/Date Utilities
The next two utilities are for display during batch files.
For an example, study the CLOCK.BAT file.
Although DOS does provide built in functions for changing
both the system date and time, it does not provide a simple
means to display either. The next two utilities provide
those functions.
7.2.10.1 Now
Displays the current system time.
Syntax: NOW = displays the time, using DOS's
GetCountry to determine the proper
time format (version 3.xx only).
NOW /s = include seconds
NOW /a = include the [m] on am/pm
NOW /a /s = include seconds and include the
[m] on am/pm
7.2.10.2 Today
Displays the current date on the screen.
Syntax: TODAY = displays the date, using DOS's
GetCountry to determine the proper
date format (version 3.xx only).
TODAY /2 = 2 digit year only.
10:20pm Sep 17,1989 Eissinger Utilities Page:22
EISSINGER UTILITIES
7.2.11 Tone
Tone allows the user to Generate a tone or a series of
tones, altering the frequency, duration and number of times
that the tone repeats.
Syntax: TONE /f220 /r10 /d200
where /f = the frequency
/r = the number of times to repeat
/d = duration
All parameters are optional and can be specced in any order
as long as they are specced using the /f /r and /d
identifiers. The defaults are /f220, d/200 and r/1.
10:20pm Sep 17,1989 Eissinger Utilities Page:23
EISSINGER UTILITIES
8 Text File Utilities
Another area where UNIX shines and MS-DOS falls short is
text file utilities. There are many public domain,
shareware and commercial utilities that help fill that gap.
Here are some more to help round out your standard array of
text file utilities.
8.1 Head
Two of the utilities that UNIX provides that are missing
from DOS are HEAD and TAIL which allow you to display or
print the beginning or end of a file respectively. Although
these are generally considered programmer's utilities they
are also useful when examining any type of text file.
HEAD.EXE prints the first section of a text file to the
screen or the printer.
Syntax: HEAD <infile> nn /option
where <infile> is the text file.
nn number of lines to print
default 20
/option are the output options
/u = upper case
/l = lower case
/p = send output to printer
8.2 Tail
TAIL.EXE prints the last section of a text file to the
screen or the printer.
Syntax: TAIL <infile> nn /option
where <infile> is the text file.
nn number of lines to print
default 20
/option are the output options
/u = upper case
/l = lower case
/p = send output to printer
10:20pm Sep 17,1989 Eissinger Utilities Page:24
EISSINGER UTILITIES
8.3 Case
Converts the entire contents of a text file to either upper
or lower case.
Syntax: CASE <infile> <outfile> upper/lower
where <infile> is the input file name
<outfile> is the new file name
upper converts all text to upper case (default)
lower converts all text to lower case
10:20pm Sep 17,1989 Eissinger Utilities Page:25
EISSINGER UTILITIES
9 Pascal Programmer's Utilities
As mentioned earlier in this manual, this set of utilities
originally started out as a small set of Turbo Pascal
Programmer's Utilities. As the set of programs and the
variety of functions has grown, the primary emphisis has
shifted to batch programming and DOS utilities. However,
the programmer's utilities are still included and expanded
within this set. If you are not a Pascal programmer, these
utilities will be of little use to you, however they may be
of interest. The program MAINLINE.EXE can be used with any
language, so long as the language uses straight ASCII text
files and you follow the rules specified for MAINLINE.EXE.
9.1 Extract
Every programmer knows the importance of system level
documentation. Most Pascal programmers are pretty good
about including comments within the source code, but almost
nobody goes much beyond that. Sorting through 6000 lines of
code to figure out what a particular program does is not
exactly the most efficient way to maintain code, even if the
original programmer was thoughtful enough to comment
throughout the source. EXTRACT can reduce that effort
somewhat. EXTRACT passes a source file and produces a text
file containing the key elements of the program: Units,
include files, procedures, functions and all comments. If a
programmer carefully comments every function/procedure, the
mainline of a program and key lines of code, EXTRACT can
produce a useful document showing the general structure of
the program. This extract, along with the source code
listing, a cross reference, screen dumps and file layouts
produces a basic set of system documentation that can be
used as reference anytime that any work needs to be done on
the file in the future.
Syntax: EXTRACT <infile> <outfile>
where <infile> is the source code file.
<outfile> is the resulting extract file.
Note: Since EXTRACT produces a straight ASCII text file, the
extract file can be edited using the Turbo Editor, or any
other editor or word processor that allows you to edit ASCII
files. This means that you can do any clean up or
additional notation directly within the extract file prior
to printing the extract file.
10:20pm Sep 17,1989 Eissinger Utilities Page:26
EISSINGER UTILITIES
9.2 Indent
INDENT can make any Pascal programmer's life just a little
bit easier. It's primary purpose is to allow an individual
programmer using source from various sources, or a team of
coders to standardize the indentation and case of Pascal
source code. Since Pascal is not case sensitive and since
the indentation is strictly up to the programmer, there are
about as many different styles of coding as there are Pascal
programmers.
Most programming shops set certain in-house standards,
however a contract programmer or just an individual that
wants to be stubborn can totally screw up the standard with
just a few procedures. Any time that you get code from an
outside source - purchase, public domain and/or shareware,
you also introduce additional styles of coding. Indent will
help make it all look about the same.
Syntax:
INDENT <filespec> /options
where <filespec> is the name of the Pascal source code.
INDENT automatically saves the original
file under the original filename, with
the extension of .SAV.
/options
/d display the indent in progress.
/l convert non-literal text to lower case.
/u convert non-literal text to upper case.
n # of spaces to indent. (default = 1).
Note: Indent is not perfect. Several conditions can cause
indent to choke, giving strange results. Greatly indented
CASE and RECORD statements will probably have to be manually
adjusted after using INDENT. INDENT can also be fooled by
text in variable, function and or procedure names that
contains those reserved words that would normally cause an
indent/outdent -such as begin, end, repeat, until, case,
record, etc.. Even taking these limitations into account,
indent can still move you much closer to standardizing your
source code. The small amount of clean up needed is much
less than what would be required to manually reformatting
the file.
10:20pm Sep 17,1989 Eissinger Utilities Page:27
EISSINGER UTILITIES
9.3 Mainline
Sometimes a programmer needs to take a quick look at the
mainline of a program, prior to actually digging into the
code. MainLine makes that examination a snap. Like TAIL
(see the text file utilities), MainLine lists the end of a
text file to the screen or the printer, however Mainline
prints the first line of the source code file and then
resumes printing on the first line that includes the word
"MAINLINE". The word MAINLINE must be all upper case and
must be one word. MAINLINE can be anywhere on the line.
If you remember to place the name of the program on the
first line of the file and put the word MAINLINE in a
comment at the beginning of the section that you want to
print as the mainline of the program, MainLine can be used
with any programming language.
Syntax: MAINLINE <infile> nn /options
where <infile> is the text file.
/options are the output options
/u = upper case
/l = lower case
/p = send output to printer
10:20pm Sep 17,1989 Eissinger Utilities Page:28
EISSINGER UTILITIES
10 System Requirements
The Eissinger Utilities requires the following minimum
hardware configuration.
Any IBM PC/XT/AT/386 or PS/2 or compatible computer, such as
Zenith or Compaq.
The memory requirements of all of these utilities vary,
however all of them will run with a minimum of 128k RAM.
Any monochrome or color video card/monitor combination can
be used, however some of these utilities are designed
primarily for color systems.
Many of the utility programs in the Eissinger Utilities
package can send their output to the system's printer,
however a printer is not required to run any of the programs
in the package.
10:20pm Sep 17,1989 Eissinger Utilities Page:29
EISSINGER UTILITIES
11 Notes from the Author
I originally developed the core of this package to fill
certain needs that I had as a programmer and a PC
Consultant. As the package grew, I've considered splitting
it up into two separate sets. One general purpose set (with
the DOS and batch file commands), another for Pascal
programmers. When you register, please, let me know your
thoughts on this point. If enough of you suggest that these
should be split into two packages, I will do so in the next
version of this package.
I would also be very grateful for any additional feedback
from you. Let me know of other utilities that would be
helpful to you, or changes/enhancements that you'd like to
see in future versions of the existing programs.
I hope that you find these programs as useful as I have. I
use most of them daily. They were a joy to write and I'm
very proud to have you use them.
10:20pm Sep 17,1989 Eissinger Utilities Page:30
EISSINGER UTILITIES
12 ShareWare
The Eissinger Utilities are distributed as ShareWare.
The software described in this document is distributed free
or at minimal charge for evaluation only. Users of this
software are to license this software according to the
instructions given in this document.
Copies of this software may be made only in accordance with
instructions given in this document.
13 Registration Form
Item Quantity X Price = Total
Disk 3.5" ________
Disk 5.25" ________
License ________ x $25 = _________
Total =========
Name : ________________________________
Address 1 : ________________________________
Address 2 : ________________________________
City/State/Zip : ________________________________
Phone : (_______) _____________________
Please Mail, with Payment to . . .
Michael A. Eissinger
Microcomputer Consultant
346 East Cedar
Hanford, CA 93230
10:20pm Sep 17,1989 Eissinger Utilities Page:31
EISSINGER UTILITIES - Table of Contents
2 License Statement. . . . . . . . . . . . . . . . . . . . .2
3 Warranty . . . . . . . . . . . . . . . . . . . . . . . . .2
4 Introduction . . . . . . . . . . . . . . . . . . . . . . .3
5 Getting Started. . . . . . . . . . . . . . . . . . . . . .5
6 DOS/System Utility Programs. . . . . . . . . . . . . . . .6
6.1 HWare. . . . . . . . . . . . . . . . . . . . . . . . .6
6.1.1 System CPU & Math Coprocessor. . . . . . . . .6
6.1.2 System Date/Time . . . . . . . . . . . . . . .6
6.1.3 Conventional Memory. . . . . . . . . . . . . .7
6.1.4 EMS - Expanded Memory. . . . . . . . . . . . .7
6.1.5 Extended Memory. . . . . . . . . . . . . . . .7
6.1.6 Computer . . . . . . . . . . . . . . . . . . .7
6.1.7 ComSpec, Path, Prompt. . . . . . . . . . . . .7
6.1.8 Video Adapter. . . . . . . . . . . . . . . . .7
6.1.9 Verify/Break . . . . . . . . . . . . . . . . .7
6.1.10 Toggle Key Status. . . . . . . . . . . . . . .7
6.1.11 Mouse. . . . . . . . . . . . . . . . . . . . .7
6.1.12 Enhanced Keyboard. . . . . . . . . . . . . . .8
6.1.13 SideKick . . . . . . . . . . . . . . . . . . .8
6.1.14 Multi-Tasker . . . . . . . . . . . . . . . . .8
6.1.15 DOS Print Spooler. . . . . . . . . . . . . . .8
6.1.16 Printer Ports. . . . . . . . . . . . . . . . .8
6.1.17 Network. . . . . . . . . . . . . . . . . . . .8
6.1.18 Disk Drives. . . . . . . . . . . . . . . . . .8
6.1.19 Running HWare. . . . . . . . . . . . . . . . .9
6.1.20 Example. . . . . . . . . . . . . . . . . . . 10
6.2 MemChk . . . . . . . . . . . . . . . . . . . . . . . 11
7 Batch File Utilities . . . . . . . . . . . . . . . . . . 12
7.1 Batch File Building Utilities. . . . . . . . . . . . 12
7.1.1 BldBat. . . . . . . . . . . . . . . . . . . . 12
7.1.2 Meld. . . . . . . . . . . . . . . . . . . . . 13
7.1.3 Paste . . . . . . . . . . . . . . . . . . . . 14
7.2 Batch Language Extensions. . . . . . . . . . . . . . 16
7.2.1 Kursor. . . . . . . . . . . . . . . . . . . . 16
7.2.2 PutCurs . . . . . . . . . . . . . . . . . . . 16
7.2.3 Screen Clearing . . . . . . . . . . . . . . . 17
7.2.3.1 ClrAbove. . . . . . . . . . . . . . . 17
7.2.3.2 ClrBelow. . . . . . . . . . . . . . . 17
7.2.3.3 ClrBox. . . . . . . . . . . . . . . . 17
7.2.3.4 ClrLine . . . . . . . . . . . . . . . 17
7.2.4 Color . . . . . . . . . . . . . . . . . . . . 18
7.2.5 Border. . . . . . . . . . . . . . . . . . . . 18
7.2.6 Typ . . . . . . . . . . . . . . . . . . . . . 19
7.2.7 PauseC. . . . . . . . . . . . . . . . . . . . 19
7.2.8 Eko . . . . . . . . . . . . . . . . . . . . . 20
7.2.9 User Response Batch Entry Utilities . . . . . 21
7.2.9.1 GetResp . . . . . . . . . . . . . . . 21
7.2.9.2 GetYN . . . . . . . . . . . . . . . . 21
7.2.10 Time/Date Utilities . . . . . . . . . . . . . 22
7.2.10.1 Now. . . . . . . . . . . . . . . . . 22
7.2.10.2 Today. . . . . . . . . . . . . . . . 22
7.2.11 Tone. . . . . . . . . . . . . . . . . . . . . 23
EISSINGER UTILITIES - Table of Contents
8 Text File Utilities. . . . . . . . . . . . . . . . . . . 24
8.1 Head . . . . . . . . . . . . . . . . . . . . . . . . 24
8.2 Tail . . . . . . . . . . . . . . . . . . . . . . . . 24
8.3 Case . . . . . . . . . . . . . . . . . . . . . . . . 25
9 Pascal Programmer's Utilities. . . . . . . . . . . . . . 26
9.1 Extract. . . . . . . . . . . . . . . . . . . . . . . 26
9.2 Indent . . . . . . . . . . . . . . . . . . . . . . . 27
9.3 Mainline . . . . . . . . . . . . . . . . . . . . . . 28
10 System Requirements. . . . . . . . . . . . . . . . . . . 29
11 Notes from the Author. . . . . . . . . . . . . . . . . . 30
12 ShareWare. . . . . . . . . . . . . . . . . . . . . . . . 31
13 Registration Form. . . . . . . . . . . . . . . . . . . . 31