home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
busi
/
fac135.zip
/
FAC.DOC
< prev
next >
Wrap
Text File
|
1990-11-16
|
48KB
|
1,022 lines
Find Area Code (FAC), Version 1.35
Copyright (c) 1990
All Rights Reserved
Developed and Marketed as Shareware
by
Michael K. Molloy
8531 East Dry Creek Place
Englewood, CO 80112
CompuServe: 72737, 3237
F I N D A R E A C O D E
D O C U M E N T A T I O N
Table of Contents
o Introduction
o Files Included
o Installation
o Using FAC from the MSDOS Command Line
o Using FAC as a Popup TSR Program
o What Are Swapping TSRs?
o Advanced Options and Configuration
o Error Conditions
o Technical/Compatibility Notes
o How to Reach the Author
o Alternative Uses
o Final Remarks
o Quick Reference List of FAC Options
Introduction
------------
Find Area Code (FAC) is an MSDOS utility which can quickly locate
U.S. and international telephone area codes. FAC performs its
search using any part of an area code, city, state, or country and
shows matches almost instantly. The program can also do "fuzzy"
searches, allowing you to use approximate spellings to find matches.
FAC uses an ASCII data file (FAC.DAT) which you can change, update,
or add to whenever you like. There are about 120 U.S. area codes in
the database, and about 150 foreign countries with over 450 city
codes.
You can run FAC from the MSDOS command line or you can make it
memory resident (also known as a popup or Terminate and Stay
Resident [TSR] program). When you install FAC as a memory resident
program, you can choose between a small (7K of RAM) swapping version
with a short (less than 2 second) delay while it swaps into memory
from disk, or you can have an instantly available popup which
requires about 120K of RAM.
The program automatically senses and supports all of the 25/43/50
line modes used in most CGA/EGA/VGA video cards and pops up in the
current mode, using the screen most appropriately for that mode.
FAC's window can be moved around on the screen by using the cursor
keys. You can also "zoom" FAC's window to use the full screen.
Although you didn't pay anything to get this copy of FAC, FAC is not
a free program. It is distributed on a "shareware" basis. If you
try the program and continue to use it, I ask you to send me $10.00
(ten dollars) to make it possible to continue to develop affordable
software like this. Though the program is not "crippled" in anyway,
this shareware version will remind you (with a brief delay as you
exit the program) to register the program. You'll see this reminder
about every fifth time you use FAC. Naturally, the registered
version of the program won't do this.
FAC is one of many area code finder utility programs, but I think
you'll find it is unsurpassed in speed, ease of use, convenience,
and price. As far as I know, it is the ONLY area code finder
capable of being installed as a 7K memory resident program.
When you register, you'll receive a disk with the latest version of
the program and a utility to stamp your serial number on all future
versions of the program. Once you have registered FAC, you are
always entitled to the latest version at anytime. You can either
download the latest version from CompuServe, a BBS, or other
computer service or I'll send you the latest release for only the
cost of sending the disk. You can either send me a SASE floppy
mailer with your floppy, or just send me $3.50 and I'll furnish the
floppy, mailer, and postage.
If you send $20, I'll send you the Turbo Pascal 5.5 source code
(less code licensed only to me). I'll include the public domain
RLINE (public domain) and TP String (shareware) files, as well (see
Technical/ Compatibility Notes, below). I can't include any of
TurboPower Software's Object Professional units or source code. You
should still be able to figure out what's going on and whether you
want to get Object Professional (you will!). Obviously, if you
purchase the source code it's only for your personal use (you can't
distribute it or sell it). Contact me for reasonable site license
and quantity discount information.
Please feel free to distribute the program to anyone you wish.
Please don't distribute: 1) modified versions; and 2) registered
versions.
Files Included
--------------
FAC only requires that two files be present: FAC.EXE and FAC.DAT,
but comes with other documentation files. The complete FAC package,
distributed as FACXXX.ZIP (where XXX is the version number), has the
following files (the " ~ " means the file MUST be present to run the
program):
FAC.EXE ~ The executable program
FAC.DAT ~ The Area Code database, an ASCII file which
you can modify in any way you like.
STAMP-SN.EXE - (Only for registered users. See Installation.)
README.1ST - Description of program and summary of features
UPDATE.LOG - History of changes/versions
FAC.DOC - Documentation (you're reading this now)
Installation
------------
You can put Find Area Code's files in any directory. The FAC.EXE
and FAC.DAT files can be anywhere on the disk as long as you set a
path to them with the MSDOS PATH statement. Note that FAC.DAT need
not be in the same directory as FAC.EXE as long they are both on the
PATH. For example, if you put FAC's files in the C:\UTIL directory,
you would need to have a PATH statement in your AUTOEXEC.BAT file
which might look something like this:
PATH=C:\;C:\DOS;C:\MISC;C:\UTIL;C:\MENU
You need about 120K of disk space and 128K RAM to run the program
from the MSDOS prompt (non-TSR mode). To use the program as a
swapping TSR, you must have an additional 240K of free disk space
for the swap files. A hard disk is recommended.
When you register FAC, you'll receive an additional program which is
used to "stamp" a registered serial number on your copy (and all
future copies) of your program. Stamping the serial number also
disables the random delay/message reminding you to register the
program.
To run this program, type "STAMP-SN" at the MSDOS prompt, and press
ENTER. You'll be asked for the name of the EXE file to modify
(since FAC.EXE could be renamed to whatever you want). If you're
using FAC.EXE, just press ENTER. If the file is found on the PATH,
it will be stamped with a serial number identified with your
registration. BE SURE to save you copy of STAMP-SN.EXE so you can
use it with future releases of FAC.
If you're a user of various executable-file compression utilities
like LZEXE, PKLITE, or EXEPACK, you MUST run STAMP-SN on the
unmodified (uncompressed) original file BEFORE you use on of these
utilities. If you try to run STAMP-SN on a compressed EXE file,
you'll be unable to stamp the serial number.
If you are a registered user of FAC, you MAY NOT give anyone a copy
of the serial number stamped program, nor may you give anyone the
STAMP-SN.EXE program.
Using FAC from the MSDOS Command Line
-------------------------------------
First, you must know how to invoke FAC from the MSDOS command line
prompt. Type "FAC /H" (or "FAC /?" or "FAC /" or "FAC ?") then
press ENTER and you'll see a complete list of options you have for
using FAC. Don't be alarmed at all the options. FAC is very simple
to use and really requires only one thing--a string to search for.
All the options are for more advanced use. FAC is designed to be
very easy to use without reference to documentation or help screens.
FAC will immediately search for area code information if you enter
the search string as an MSDOS parameter after the program name. If
you wish, you can simply type "FAC" to start the program without a
parameter. You'll be prompted for a search string once inside the
program. For example, suppose you wanted to know the area code for
Boulder, Colorado.
At the MSDOS prompt, type: "FAC boulder" (without the quotes, of
course) then press ENTER. The program will start, a window will
popup on the screen, and the program automatically begins its
search. Almost instantly, you'll see information about the area
code for Boulder. The first column in the display window has the 3
digit area code 303 (international area codes aren't necessarily 3
digits). The next column shows the 2 character postal abbreviation
for Colorado, CO. The third column shows the full name of the
state. The last column shows the major cities in this particular
area code. Notice Boulder appears in this list. When you've
finished with the program, just press Esc and you'll exit back to
MSDOS.
Let's take another example. Suppose someone leaves you a note to
call someone in a 309 area code. You don't recognize this area code
and it's inconvenient to look up the area code in the phone book.
You type "FAC 309" then press ENTER. Almost instantly, you learn
that the 309 area code includes Peoria, Molina, and Rock Island,
Illinois.
Searching for an international area code is almost exactly the
same. Just type in a city name, say Paris. The program will display
the country code in the first column, the country name in the next
column (there is no postal abbreviation for most foreign countries),
and a list of major cities and city codes for that country in the
last column. Each city code is listed in parentheses immediately
after the city name. So you know the country code for France is 33
and the city code for Paris is 1.
You get the idea. By typing "FAC X" where X is any alphanumeric
string, you can quickly search the area code database. You can
search by area code, state postal abbreviation, state name, country,
city, or any portion of thereof. The search string can be in any
combination of upper or lower case letters and numbers.
NOTE: If you use only two characters, the program assumes you want
to search for two-letter state postal abbreviations which appear
only in the first 7 characters of each line. The program doesn't
look at anything else on the line except these first 7 characters.
Once you're inside the program, you can search for other area code
information by entering another search string at the prompt. Search
strings are limited to 11 characters. To edit your entry, press
Backspace, or press Esc to erase your entire entry. If you press Esc
once more, you'll exit the program. You can make any number of
searches before exiting the program. Remember, just press Esc to
exit the program (Ctrl-C or Ctrl-Break will also exit).
While you're inside FAC, you can get help by pressing F1. This
shows you that F1 gets help, F2 toggles the "Fuzzy" search mode, and
Esc exits the program. See Advanced Options and Configuration for a
full discussion of the very powerful fuzzy search mode.
Sometimes, your search string will find more information than can be
displayed in the window. If the screen fills up with information,
the program will pause and prompt you to press the Esc key to stop
displaying information from the current search, or press any other
key to continue displaying information. If you press Esc to stop
displaying information, you'll be returned to FAC's prompt. Pressing
Esc once more will exit the program.
If FAC doesn't find a match for your search string in its data file,
you'll see a brief message in the center of the window saying that
the string couldn't be found.
Once you've experimented with FAC, you may notice that sometimes it
pops up in the upper half of your screen and sometimes it pops up in
the lower half. Why? FAC looks at where the cursor is positioned
and brings up the FAC window in the opposite half of the screen
you're working in. This insures the program doesn't obscure
something you may need to see while you're using the program.
The other thing you may have noticed is that FAC pops up in whatever
mode (25, 43, or 50 lines) your video card is in. FAC automatically
checks to see how many lines you're using at the moment and adjusts
its windows accordingly. FAC isn't designed to support 40 column
mode, but will safely pop up (although you won't like what you see).
FAC won't popup at all when you're in graphics mode.
You can reposition FAC's window anywhere on the screen by pressing
the cursor keys.
To "zoom" the FAC window to take up the full screen, press F10.
Press F10 again, and the window will "unzoom."
Using FAC as a Popup TSR Program
--------------------------------
More often than not, when you're at your computer and you need area
code information, you're in the middle of doing something else. To
use FAC as described above, you must save your work, exit the
program you're using, then invoke FAC. FAC would tell you what you
need to know, then you would have to restart your original program,
go back to where you left off, and try to go back to work.
It would be much more convenient if you could simply have FAC
immediately "popup" over whatever you're doing, give you the
information you need, then go away, leaving you exactly where you
were. Not only would it be more convenient, it would save a lot of
your valuable time.
FAC can do this. All you have to do is tell FAC to install itself
as a "popup" or memory resident program.
You'll also see this type of program called a TSR, which stands for
Terminate & Stay Resident. A TSR is installed or loaded once from
the MSDOS command line. It stays in memory even while you're doing
other things, and watches to see when you press a special key or key
sequence to activate it. This special key sequence is known as a
"hotkey". When you press the hotkey, the program starts.
Here's how to install FAC as a memory resident, popup program. At
the MSDOS prompt, type: "FAC /I" (without the quotes) then press
ENTER. FAC will then install itself in memory as a TSR. When it
has successfully installed itself, it will describe how it has been
installed. In this case, you will use FAC's defaults.
Once you've installed FAC as described above, you can press FAC's
hotkey to pop it up wherever you are. FAC's hotkey is
<Alt><LeftShift><F>. To press this key sequence, press and hold the
"Alt" key, press and hold the Shift key on the left side of your
keyboard, then press the F key. As soon as all three keys are
pressed, FAC will "wakeup" and activate itself.
FAC will draw its window on the screen right over the top of
whatever you're doing. Don't worry. When FAC is done, it will
return the screen to exactly the way it found it.
When you invoke the TSR version of FAC as installed above, it works
somewhat differently than it does when you start it from the MSDOS
prompt. Recall that when you run the program from the MSDOS prompt,
you must enter a parameter (search string) so FAC knows what to
search for. When FAC operates as a TSR, it can read the text string
(state, area code, city, etc.) you want to search for right off the
screen by looking at the word "under" or to the left of where you
have the cursor positioned! (You can turn off reading the search
string from the screen by using the /G switch. See Advanced Options
and Configuration.) If the cursor isn't in a word or just to the
right of a word, no search string will be passed to FAC, but it will
still pop up. Reading the search string from the screen can save
you time typing in what to search for and it can avoid errors you
might make while typing.
So, what happens? You press the hotkey, FAC pops up over your work,
reads the text "under" the cursor, and immediately begins its
search. After it finds and displays a match, it prompts you for
another search. Now the program operates exactly the way it does
when used from the MSDOS prompt.
If you use the cursor keys to reposition the normal FAC window, the
position you choose will be retained the next time you press the
hotkey. Note that this means that because you've repositioned the
window, it may pop up and obscure text near the cursor. If this is
a problem or you want to "reset" window positioning to pop up in the
opposite half of the screen from the cursor, just press F10 (once if
you are zoomed, twice if you aren't zoomed) and the automatic
positioning will be restored.
You can press F10 to zoom FAC's window to take up the full screen,
and the program will "remember" to pop up in this mode the next time
you press the hotkey.
When you want to exit, press Esc, and FAC will collapse its window,
and restore your screen and cursor location exactly the way it
appeared when you pressed the hotkey.
What Are Swapping TSRs?
-----------------------
You may have noticed that when you pressed the hotkey, a reverse
video message appeared on the bottom of the screen which said
"Swapping in..." Similarly, when you pressed Esc to exit the
program, "Swapping out..." appeared. These messages tell you the
program is swapping into and out of memory (RAM) from disk. Why
does the program do this?
Swapping TSRs are relatively new. When they install, they take a
snapshot of the complete program and write it out to a "swap file"
on disk, then free up all but a tiny portion of memory (which holds
the portion of the program which watches for the hotkey and then
does the actual swapping to/from disk). When swapping TSRs pop up
over your existing program, they may also have to take a snapshot of
your application and write it to disk before it swaps the rest of
the TSR in. So why do we want to put up with all this swapping in
and out? Doesn't this cause delays? Why can't the program just pop
up instantly like my other TSRs?
Well, like everything else in the world, there are tradeoffs. In
order to run full-featured, advanced programs, it takes memory
(RAM). The more full-featured the program, the more memory it
takes. Unfortunately, memory is a limited resource and
"full-featured" often translates to "memory-hungry." FAC has many
features but still only requires about 128K of RAM to run. This
isn't a problem if FAC is the only program you want to run, but it's
a big problem if you want FAC to be loaded as a TSR at the same time
you're running other (full-featured) programs.
When FAC is installed as a swapping TSR, it only requires about 7K
of RAM to watch for you to press the hotkey and then swap what
you're doing out and swap itself in. With all the other TSRs you
use and the other programs you run, you need all the help you can
get. The TSR swapping technology FAC uses helps you optimize all
the memory you have with very little impact on how you use the
program. As computers continue to become faster and more powerful,
you'll see more and more swapping TSRs.
The time you spend waiting on swapping is relatively trivial
compared to the time it takes to leave your application, then
return. On XT class computers, swapping delays are only about 1 or
2 seconds. On 286 class computers, delays are usually less than 1
second. On 386 and 486 class computers, delays are usually less
than .5 seconds. Of course swapping delays can be affected by a
wide range of hardware and software variables. Fast hard disks with
1:1 interleaves and high data transfer rates make a huge difference,
even when used on an 808X CPU. If you're able to use a RAM Disk, or
disk caching (hardware or software) you'll find swapping delays to
be negligible or even unmeasurable. See the section below on
Advanced Options and Configuration for information on how to reduce
swapping delays.
The bottom line: I think the tradeoffs (disk swapping delays) are
completely acceptable given the tremendous savings in your precious
RAM. I think you'll think so, too! (Note: future versions of FAC
should allow swapping to either extended or expanded memory.)
Advanced Options and Configuration
----------------------------------
FAC has several different options or "switches" you can use to
customize the way FAC works when you invoke the program or install
it as a popup. Again, FAC is designed to be very easy to use, and
you may be perfectly happy with FAC's performance when you use its
default options.
Switch options are always preceded by either a "/" or a "-" and can
be upper or lower case letters. Remember, to see a complete list of
all FAC's options, just type "FAC /H" at the MSDOS prompt and press
ENTER. Here's a quick summary of FAC's switches:
/F Enables "fuzzy search" mode
/I Loads popup/TSR with defaults
/N No swapping; used with /I
/M Suppresses swapping messages; used with /I
/P Path for swap files; used with /I
/G Don't read text from screen on popup; used with /I
/U Unload popup from memory, if possible
/X Don't use exploding windows
/Z Use a "zoomed" window which uses the full screen
Most of these switches can be used in either of two ways: 1) as
command line switches, entered when the program is run; or 2)
entered as part of an environment variable called "FAC". If you
wanted the program to use the fuzzy search mode, you could simply
enter "FAC bolder /f" and the search would take place, using the
fuzzy search. But, what if you wanted FAC to ALWAYS start in
(default to) fuzzy mode? This is where the FAC environment variable
would be used. Use the SET command to assign a string to the FAC
environment variable:
SET FAC=/f
If you entered this before running FAC or had this line in your
AUTOEXEC.BAT file, FAC would always start in fuzzy mode without
having to enter it on the command line when you start the program.
Suppose you always wanted FAC to use fuzzy search mode, zoomed
windows, non-exploding windows, and when installed as a TSR: no
swapping messages with a swap file path of d:\temp and without
getting search strings from the screen. Instead of entering each of
these switches each time you run the program, you would use the
following environment variable entry, preferably in your
AUTOEXEC.BAT file:
SET FAC=/f /Z -x /M -pd:\temp /g
^ ^ ^ ^ ^ ^
Fuzzy mode ----------------+ | | | | |
Zoomed window ----------------+ | | | |
Non-exploding window ------------+ | | |
Swapping messages off --------------+ | |
Swap path -----------------------------+ |
Don't get search string from screen -------------+
Now, every time FAC is run the above settings will be the defaults.
If you install the program as a TSR, these settings will be the
default settings unless you change them after invoking the program
with the hotkey. If you change them while TSR, that change will
remain effective until the next time you change it.
Note the use of both a slash and dash as switch characters and the
mixed use of upper and lower characters. You can use all FAC option
switches in the SET FAC environment variable except /I and /U. You
can use any combination of switches in any order. Invalid switch
settings will be ignored. If you enter a swap path with the /P
switch, it will be checked for validity prior to program execution.
The following is a complete description of all FAC option switches.
The "/F" Switch
---------------
Used for both non-TSR and TSR. Can be used in the FAC environment
variable.
The /F switch says, "Use a 'fuzzy' search method which doesn't
require an exact spelling to get a match." When you use the /F
switch, you tell the program to use a powerful text matching
technique called the soundex algorithm. Soundex searches attempt to
match words based on the way they sound rather than by how they're
spelled. If you aren't sure how a city, state, or country is
spelled, or you're getting a 'not found' message with the string
you're using, try the /F switch.
There is a price to pay for the soundex searching method: speed.
Searches may take up to 10 times as long as normal "exactly spelled"
searches, but this is well worthwhile if it's the only way you can
find what you're looking for. You may also get a lot more seemingly
unrelated "hits" from a fuzzy search, but this is normal. After
all, you're looking for anything that remotely resembles or sounds
like your search string.
Since fuzzy searches take longer, you may need to stop the search
before it completes. You can press any key during the fuzzy search
and it will stop and return to the program's prompt.
Once you're inside FAC, you can use the F2 key to toggle between
normal searching and fuzzy searches (there's an indicator on in the
top center of the window frame when you're in fuzzy mode). If
you've installed FAC as memory resident program, the program will
remember whether you were in fuzzy mode the last time you used it.
Examples: "FAC Colorawdo /f"
"FAC springfeild /f"
In both these examples, the program would immediately start
searching for the specified strings, but the 'Fuzzy Search'
indicator would be on at the top center of the window frame, and you
would also see a flashing message telling you the search is in
progress. The first example would give you "hits" for Colorado,
even though it's misspelled. The second example would find three
instances of Springfield as you might expect, but also yields Palm
Springs, Steamboat Springs, Colorado Springs, and Big Spring.
The "/X" Switch
---------------
Used for both non-TSR and TSR. Can be used in the FAC environment
variable.
This option or program "switch" applies to FAC when run from the
MSDOS prompt (non-memory resident mode) or when you install it as a
popup. If you use the "/X" switch, FAC will disable its use of
exploding windows. Exploding windows don't change the way the
program searches or the way you use it, it just changes how the
program looks when it starts and finishes.
If you want to disable exploding windows when you run the program
from the MSDOS command line (non-TSR), just put the /X switch after
your search parameter.
Example: "FAC boulder /x"
When the program starts, the window would appear instantly on the
screen instead of being exploded onto the screen.
The "/Z" Switch
---------------
Used for both non-TSR and TSR. Can be used in the FAC environment
variable.
This option applies to FAC when run from the MSDOS prompt
(non-memory resident mode) or when you install it as a popup. If
you use the "/Z" switch, FAC will "zoom" its window to take up the
entire screen.
Example: "FAC TX /Z"
When the program starts, the window takes up the entire screen. You
might want to use this option if you're viewing lists of area codes
or all the area codes for one state.
The "/I" Switch
---------------
Used to install FAC as a swapping or non-swapping TSR. Can NOT be
used in the FAC environment variable.
The /I switch says, "Install FAC as a memory resident program using
its defaults and/or other switches." If you use /I by itself, the
program will install itself using several predefined defaults, all
of which can be changed by using other switches.
If you use /I alone to install FAC, the following defaults are used:
- Swapping to disk is enabled.
- Messages which tell you swapping is happening are enabled.
- The disk and directory path FAC uses for swap files is the same
disk/directory where FAC found FAC.DAT.
- Exploding windows are enabled (see the /X switch above).
After you use the /I switch to install FAC, you will see a status
message which describes the state of each of the above defaults.
Note that if FAC is already installed, you won't be able to install
a second copy. If you try to install it again, you'll get an error
message and the installation will abort.
If you don't have enough disk space for the swap files, you'll get
an error message and FAC won't install as a TSR.
After you install FAC as a TSR, don't move or rename the FAC.DAT
file or you will probably get dumped from the TSR when you try to
use it.
Please note that you can't pop up FAC when you're using a program
which is currently in graphics mode. If you try to pop it up,
you'll hear a beep and nothing else will happen.
Also, be aware that since FAC swaps the currently running program
out so it can become active, you could have a problem with some
programs, especially communications programs. In this case, you
should run the program in non-swapping mode (/N). It still isn't
advisable to pop up any TSR when a communications program if data is
coming in or going out.
FAC should work fine with most other TSRs. The only problem you may
encounter is when you don't load FAC last among other TSRs. This
won't hurt anything, but you may not have access to your other TSRs
when FAC is swapped in (since it may have swapped the other TSR(s)
out of RAM). If FAC isn't in use, or it's been installed as a
non-swapping TSR, you shouldn't have a problem with TSRs loaded
after it.
Don't attempt to install FAC while you're "shelled out" of other
programs. For example, you can drop temporarily to MSDOS from many
programs, but you should never try to install FAC while you're doing
so. This also applies to many menuing programs like PowerMenus and
AutoMenu. These programs can leave a portion of themselves in
memory. You should never try to install FAC as a TSR from any menu
program. Completely exit from any other program before attempting
to install FAC as a TSR. You may run FAC from the MSDOS prompt
(non-TSR) while shelled out of another program if you wish.
Example: "FAC /I"
This would install FAC as a TSR with the defaults described above.
What follows is a more detailed discussion of these defaults, how
you can change them, and why you might want to.
The "/N" Switch
---------------
Used with /I to install FAC as a non-swapping TSR. Can be used in
the FAC environment variable.
The /N switch says, "NO swapping; don't use the swapping TSR mode;
keep the entire TSR in RAM." This will give you instant access to
FAC when you press the hotkey, but requires about 120K of RAM. If
you have plenty of RAM, you need FAC to be available instantly, and
you use programs which won't miss the memory FAC requires in this
mode, use the /N switch.
The default is a swapping TSR.
Example: "FAC /I /N"
This would install FAC as a non-swapping TSR.
The "/M" Switch
---------------
Used with /I when installing FAC as a swapping TSR. Can be used in
the FAC environment variable.
The /M switch says, "don't put the swapping in/out... messages at
the bottom of the screen when swapping." The program doesn't work
any differently, except that you won't see the messages. If you use
a RAM disk for swapping, the swapping messages might be an
unnecessary distraction.
The default is to have swapping messages appear.
Example: "FAC /I /M"
This would install FAC as a swapping TSR, but swapping messages
would be disabled.
The "/P" Switch
---------------
Used with /I when installing FAC as a swapping TSR. Can be used in
the FAC environment variable.
The /P switch, when followed by a complete path specification, says,
"put the swap files in the specified disk/directory." The path
specification must be a valid, already existing disk/directory, and
must be less than 127 characters. Do not put a backslash on the end
of the path specification (unless you're using the root directory of
the specified disk). In other words, use the same format for the /P
path specification that you would for a normal DOS PATH statement.
The main reason you would use this switch would be to tell FAC to
use a RAM disk. If you have a RAM disk, with at least 240K of space,
you should use the /P switch to significantly speed up swapping. If
you use /P to swap to RAM disk, you may wish to use the /M switch to
disable the swapping in/out messages.
It's highly inadvisable to use a removable (floppy) disk for the
swap path. You won't harm anything, but you could lock up your
machine and have to reboot if the disk isn't there when swapping
needs to occur.
Whether you use the /P option or not, FAC generates either one or
two swap files, named FAC-SWP1.$$$ and FAC-SWP2.$$$, each about 70K
in size, located wherever FAC.DAT was found (unless you specify
otherwise with the /P switch). These files are marked with both
System and Hidden attributes to make it less likely you will
accidentally delete them. If they are deleted after FAC is loaded,
and you try to pop up the program, you'll get an error message and
you'll have to reboot. When you successfully unload FAC, the swap
files are deleted. If you reboot or turn your machine off, the
file(s) will remain, but will be written over the next time FAC is
loaded as a TSR.
The default is to put swap files in the same disk/directory where
FAC.DAT was found. If you aren't sure where this is, run FAC with
no parameters and look at the default determined by the program at
run time.
Examples: "FAC /I /Pd:"
"FAC /I /Pc:\junk
"FAC /I /Pc:\temp\" <=== WRONG!! No backslash after the path!
The first example would install FAC as a swapping TSR with the swap
files located on the D: drive. The second example would use a swap
file directory called C:\JUNK. The third example is an invalid path
name and would give an error.
The "/G" Switch
---------------
When used with /I; don't get search strings from the screen in TSR
mode. Can be used in the FAC environment variable.
The /G switch says, "When you popup FAC, don't read the text to
search for off the user's screen; just ask for a string." This
switch prevents you from grabbing the search string from the screen
and requires you to enter it yourself.
The default is to read the screen for the text to search for.
Example: "FAC /I /G"
This example disables reading the text from the screen when FAC is
popped up.
The "/U" Switch
---------------
Attempts to uninstall FAC (in TSR mode) from memory, and delete swap
files, if they exist. Can NOT be used in the FAC environment
variable.
The /U switch says, "If it is safe to do so, remove FAC from RAM as
a swapping or non-swapping TSR, free up associated memory, and
delete any swap files which may have been created." Use the /U
switch if you need to uninstall the program. "If it is safe to do
so" means just that. If FAC isn't installed as the last TSR, you
won't be able to uninstall it. (You may be able to uninstall FAC by
using something like the Mark/Release TSRCOM utilities, but even
then, you must remove FAC and all TSRs loaded after it. If you plan
to frequently uninstall FAC you should load it last. Of course if
you load FAC last, then you won't be able to unload TSRs loaded
before it. Naturally, you can uninstall any TSR by rebooting your
machine.
Error Conditions
----------------
FAC is very friendly and shouldn't give error messages unless
there's really something you need to fix. Here are some error
messages FAC could generate and why you might get them:
- "Error while trying to find/open FAC.DAT" Make sure FAC.DAT
exists and that the disk and directory containing FAC.DAT is on your
MSDOS path.
- "XXXX is an invalid path name!" You've specified an incorrect
path when using the /P switch or the path you've specified is too
long (the limit is 127 characters)
- "FAC isn't loaded!" You've tried to uninstall FAC (as a TSR) when
it wasn't previously loaded. Use the /I option to install it.
- "Unable to unload FAC. Probably isn't safe to do so!" This isn't
really an error message; it just means that the program can't
uninstall itself, probably because there's another TSR or program
loaded after it. Try rebooting if you have to unload it.
- "XXXX not found." This, too, isn't really an error message.
You'll get this message any time you searched for string and it
wasn't found. The string you're searching for may not be in FAC.DAT
or you may need to check your spelling. Try the fuzzy search mode
if you aren't sure of the spelling.
- "FAC is already memory resident!" You're trying to install FAC
after it's already been loaded. Use FAC /U to uninstall it.
- "Unable to go TSR. Do you have enough swap file disk space on
X:?" This message means FAC couldn't go TSR, probably because you
don't have enough RAM, or you don't have enough disk space for the
swap files.
- "Couldn't make window!" There was a memory allocation error when
FAC tried to draw its window. You probably don't have enough RAM to
run FAC.
Technical/Compatibility Notes
-----------------------------
Find Area Code runs on IBM PC compatibles (clones) using MSDOS 3.X.
I've not tested the program under MSDOS 4.X. I'm pretty sure the
program won't work with DOS 2.X since 2.X handles paths differently.
It might work if you're in the same directory as the data file.
One of the reasons the program searches so quickly is RLINE, Don
Strenczewilk's excellent Turbo Pascal OOP text file handling unit.
RLINE allows you to define a "file of lines" object. In addition,
FAC can search at a rate of over 800 lines per second on an XT with
a slow hard disk! Thanks to Don for graciously donating his code to
the public domain!
Another reason the program is so fast is due to Richard Winkel's
TPSTR. TPSTR (Ver 1.21) is a Turbo Pascal Unit with about 30
REXX-like string procedures and functions, all carefully crafted in
assembly language. Richard's licensing fee is very reasonable ($10)
and you get all the Turbo Pascal and assembly source code. Highly
recommended!
The excellent TSR swapping system and windowing comes from Object
Professional 1.02 from TurboPower Software. If you do any
programming in Turbo Pascal 5.5, you owe it to yourself to use
Object Pro!
How to Reach the Author
-----------------------
Michael K. Molloy
8531 East Dry Creek Place
Englewood, CO 80112
CIS: 72737, 3237
I also frequent the MicroManiac!, Tom Gettys' fantastic Wildcat BBS
(303-673-9470) in Lafayette, CO. His board should always have the
latest version of Find Area Code (and hundreds of other fresh
uploads!).
Alternative Uses
----------------
You may have thought to yourself as you used FAC, "Hmmm, if I can
pop FAC up anywhere as a tiny TSR, and if I can change the contents
of the FAC.DAT file, why can't I put my own personal information
into it and quickly and conveniently search for it when I need it?"
You can, and I hope you will.
I think the ease of modifying FAC's database is a very valuable
feature. In fact, one of the reasons I decided to write "yet another
area code finder" was the frustration I had with the fact you
couldn't modify, correct, update, or add to some of the other area
code program data files.
My own personal use of FAC goes far beyond just using it to hunt
down area codes. Here's what I do.
I have (you probably do, too if you're any kind of computer nut) a
database of friends and relatives with which I maintain a quick
reference phone list. Periodically, I use my database program to
generate a report which I print to disk. The report looks something
like this:
John Doe 555-555-5555 1234 Anywhere St., Anyplace, CO 12345
Joe's Software Shop 555-1234 (open 24 hours)
Jay's Hardware Emporium 555-9876 (Closes at 6pm)
Jim Smith 555-0000 (Keep trying; has teenagers on phone)
.
.
.
(you get the idea)
I use an editor to paste the ASCII information into the front of my
FAC.DAT file, and presto! I have a 7K popup database of our family
and friends. I put the information at the front only to improve
search times for the information I need most frequently; it can be
anywhere, in any format, in any order since every character of the
entire FAC.DAT file is searched every time (except when your search
string is only 2 characters; that tells the program you're searching
for a state postal abbreviation in the first 7 characters; be
careful with that!).
Obviously, if you change the data file to reflect your own data, it
could be used for almost anything. Just remember, the program is
line-oriented--all the information for one "record" must be on the
same line. Each line in the data file is limited to 119 characters.
If lines are longer than 119 characters, they'll be truncated when
they are displayed. The program will automatically wordwrap lines
of up to 119 characters when the "record" is displayed.
I guess the way I use FAC makes it kind of a "poor man's personal
information manager (PIM)". I've found that FAC is far superior to
LIST and other text file handling programs when it comes to ease of
use and search speed.
FAC certainly isn't offered as any kind of free format database
package, but I think it bridges an important gap between a
full-blown database application and a tattered piece of paper taped
above your computer desk.
I think this capability gives FAC significant "value added." I hope
you agree and see another reason to support the program financially
with your registration.
Use your imagination! If you come up with radical or useful new
applications for Find Area Code "engine", please let me know.
Final Remarks
-------------
Many thanks to my wife, Bobbea, for her friendship, love, and
support in every aspect of my life.
Thanks to Tom Gettys for his patient and valuable beta test feedback
and for having the best BBS in Colorado!
I've made every effort to provide the correct area codes and foreign
country city codes. If you find errors or additions, please send
them to me on CompuServe.
NOTE: If I get registrations and user support for this program, I'll
add other valuable features in future versions:
- XMS/EMS swapping support
- Install/clone program to set user defaults (colors/hotkey/etc.)
- Multiple data file handling ("subject" databases?)
- Mouse support?
- You tell me!!
If FAC doesn't do what you think it should, or you'd like for it to
do something else, I would be happy to develop a customized version
of the program for anyone who wants one (for a reasonable fee).
I'd appreciate bug reports, new feature requests, comments,
performance problems, constructive criticism, suggestions,
additions, and/or corrections regarding Find Area Code.
Enjoy!
|\ /| /
| \ / |/
| \/ |\ /|
|ike | \/ |olloy
------------------------------------------------------------------------
Quick Reference List of FAC Options
-----------------------------------
FAC Shows brief help information
FAC <String> Searches for String. Can be any part of or
all of a City, State, Country, or Area
Code. If String is 2 characters then a
search on U.S states only is assumed. Not
a TSR
FAC <String> /F Enables "fuzzy search" mode to find
approximate spellings
FAC /I Loads popup/TSR with defaults:
- Swapping on
- Swapping messages on
- Swap file path = same path FAC.DAT found on
- Exploding windows on
- Read search string from screen
FAC /I /N Loads popup; no swapping (instant popup mode
but requires 120K RAM)
FAC /I /M Loads popup; suppresses swapping messages
FAC /I /Pc:\temp Loads popup: path for swap files = c:\temp
Specify RAM disk if available/possible
FAC /I /G Don't read text from screen on popup (when
used with other parameters)
FAC /U Unloads popup from memory, if possible;
deletes swap files
FAC /X Don't use exploding windows (when used
with other parameters)
FAC /Z Use a "zoomed" window which uses the full
screen (when used with other parameters)
------------------------------------------------------------------------
*** End of FAC.DOC ***