home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / busi / zip_code.zip / ZIPKEY.DOC < prev    next >
Text File  |  1989-03-30  |  160KB  |  3,628 lines

  1. ZIPKEY zipcode directory program  V1.0e      March 31, 1989
  2.  
  3. The entire package is Copyright 1989 Eric Isaacson.
  4. All rights reserved.
  5.  
  6.    Eric Isaacson Software
  7.    416 E. University Ave.
  8.    Bloomington, IN 47401-4739
  9.    (812)339-1811
  10.  
  11. PLEASE read Chapter 1 for legal terms, how to register/subscribe
  12. for the package, and the overview of the program.
  13.  
  14. This is the first "official product" release of ZIPKEY. The
  15. program has been working for several months now, including over
  16. two months of beta testing, and a couple of weeks of preliminary
  17. public release on a few selected BBS's.
  18.  
  19.  
  20. QUESTION: "I bought this program from XYZ Software House, that
  21.   advertised great software for $5 per disk.  What's going on
  22.   here?  Have I already bought the program, or what?"
  23.  
  24. ANSWER: Well, no, not exactly.  You've bought a disk that has
  25.   great software on it; unless you legally purchased the
  26.   registered version of ZIPKEY, you haven't bought the software
  27.   yet.  ZIPKEY, like most major software offered by the
  28.   $5-per-disk distribution houses, is free-distribution software
  29.   (also known as "shareware", or "user-supported software").
  30.   That means I retain the rights to ZIPKEY, but I choose to let
  31.   people pass the evaluation copy around.  I have no business
  32.   relationship with any distribution houses in the U.S.; I don't
  33.   get a penny of the $5 (or whatever) you paid them for the disk
  34.   containing ZIPKEY.  So I need and expect to be paid by you,
  35.   because I make a living out of making and supporting shareware
  36.   products.
  37.  
  38.   Some distribution houses do a pretty poor job of revealing the
  39.   shareware nature of the software they sell.  If you thought you
  40.   had purchased the software free and clear, you might feel
  41.   justified in being angry with them for having misled you.  And
  42.   you might look around for houses that do a better job of
  43.   informing the public.  But I hope you'll take the time to
  44.   consider everybody's role in the shareware marketing scene; if
  45.   you do, I think you'll conclude that although you may have been
  46.   misled, you haven't really been cheated out of anything.
  47.  
  48.   Shareware is great for authors like me, who have spent all
  49.   their years in their computer holes, learning to be great
  50.   programmers, and no time in business school learning marketing
  51.   and distribution techniques.  We simply cast our programs to
  52.   the winds.  They are distributed at practically no cost to us.
  53.   That's why we can charge a lot less than the cost of
  54.   "commercial" software.
  55.                                                               0-2
  56.  
  57.   Shareware is also great for customers like you.  You can try
  58.   out the software before paying for it.  You'll know that a
  59.   successful shareware product is good, because only satisfied
  60.   customers pay for it.  The existence of shareware infuses
  61.   healthy competition into the entire software market, for both
  62.   price and quality.  In the case of ZIPKEY, I'm utterly
  63.   convinced that you'll never find a better value for a zipcode
  64.   directory, anywhere.
  65.  
  66.   Finally, let's consider the distribution houses.  They provide
  67.   a legitimate service, for which they charge a reasonable price.
  68.   The best houses act as librarians, evaluating and cataloguing
  69.   software.  Most pay thousands of dollars for advertising.
  70.   Their cut is far less than the distributor's cut for
  71.   "commercial" software (they prosper because their volume is
  72.   bigger).  Most customers for the distribution houses are repeat
  73.   customers, who are aware of, and happy with, what they are
  74.   getting.  If it weren't for your XYZ House, you might never
  75.   have heard of ZIPKEY, or might never have figured out where to
  76.   obtain it.
  77.  
  78.   So I hope you'll be happy with shareware, and actively desire
  79.   to support it.  You'll feel good about promoting a healthy
  80.   situation for everybody.  And you'll encourage the best
  81.   programmers in the world to keep writing for you, instead of
  82.   for the big corporations.
  83.  
  84. Now that I've said that, let's move on to the package.   The
  85. ZIPKEY evaluation package consists of the program ZIPKEY.EXE, the
  86. database file ZIPKEY.OVL, and this manual ZIPKEY.DOC.  I have
  87. formatted this file so that it can be printed at 10cpi with
  88. margins.
  89.  
  90.  
  91.  
  92. TABLE OF CONTENTS
  93.  
  94.  
  95. CHAPTER 1  INTRODUCTION AND LEGAL TERMS
  96.  
  97. Overview of This Manual                                     1-1
  98. Overview of ZIPKEY                                          1-1
  99. Operating Requirements                                      1-2
  100. Legal Terms                                                 1-3
  101. Legal Conditions for Free Distribution                      1-4
  102. Sources and Copyright Status of ZIPKEY's Database           1-5
  103. Difference Between the Evaluation and Registered Versions   1-6
  104. Naming Conventions for Distribution                         1-7
  105. About the Author                                            1-8
  106. How to Contact Me                                           1-8
  107.                                                               0-3
  108.  
  109. CHAPTER 2  LOOKING UP ZIPCODES
  110.  
  111. Demonstration Mode                             2-1
  112. Signon Window                                  2-1
  113. Zipcode Search                                 2-2
  114. Arrow and Paging Keys During Zipcode Search    2-4
  115. State and City Search                          2-5
  116. Multiple Zipcode Cities                        2-6
  117. City Only Search                               2-6
  118. Moving From State to State                     2-7
  119. Unabbreviation                                 2-8
  120. Repeat Last Zipcode                            2-8
  121.  
  122.  
  123. CHAPTER 3  ZIPKEY CONFIGURATION
  124.  
  125. Determining Your Configuration Needs      3-1
  126. How to Create a ZC File                   3-2
  127. Default Options                           3-2
  128. Memory Model                              3-3
  129. Intermediate Results                      3-4
  130. Numlock On                                3-4
  131. Slow Down Keyboard                        3-5
  132. Window Characteristics                    3-5
  133. Monochrome and Color Window Settings      3-6
  134. Hotkey Configuration                      3-6
  135. Hotkey Name                               3-7
  136. Zipcode Source                            3-8
  137. Keystroke Playback Sequence              3-10
  138. Multiple Hotkeys                         3-12
  139. Exit Keys                                3-12
  140. Configuration Editing Menu               3-13
  141. Named Configuration Files                3-14
  142. Modifying Configuration Files            3-14
  143. More Hotkey Examples                     3-15
  144. Conclusion                               3-16
  145.  
  146.  
  147. CHAPTER 4  RUNNING MEMORY-RESIDENT ZIPKEY
  148.  
  149. Installing ZIPKEY as a Memory-Resident Program     4-1
  150. Correcting Your Configuration                      4-2
  151. Re-installing a New Configuration                  4-3
  152. Making ZIPKEY Permanently Available                4-4
  153. ZIPKEY and Other Memory-Resident Programs          4-4
  154. Finding ZIPKEY Files on Your Disk                  4-5
  155. Installing Files on a Network                      4-7
  156.  
  157.  
  158. CHAPTER 5 GENERATING AN ORDER FORM
  159.  
  160. Automatic Order-Form Generation            5-1
  161. ZIPKEY's Schedule of Prices                5-1
  162. Gathering Your Order Information           5-2
  163. Answering the Order-Form Questionnaire     5-3
  164. Possible Amendments to the Total Price     5-3
  165.                                                               0-4
  166.  
  167. CHAPTER 6 PROGRAMMATIC INTERFACE
  168.  
  169. The ZIPKEY Interrupt                6-1
  170. Testing for ZIPKEY's Presence       6-1
  171. ZIPKEY Calling Conventions          6-2
  172. The ZIPKEY Functions                6-3
  173. Sample Program Code                6-10
  174.  
  175.  
  176. INDEX
  177.  
  178. CHAPTER 1   INTRODUCTION AND LEGAL TERMS
  179.  
  180.  
  181. Overview of This Manual
  182.  
  183. Welcome to ZIPKEY!  I've tried to make the ZIPKEY program as
  184. self-explanatory as possible, so that you won't need to consult
  185. this manual very much.  I believe I have succeeded to the extent
  186. that if you're a somewhat experienced computer user, you'll be
  187. able to figure out the program on its own.  But ZIPKEY is a
  188. complex program with a fair number of sophisticated features.  If
  189. you're a less experienced computer user, or if you'd like to
  190. explore every nook and cranny of ZIPKEY's functionality, you'll
  191. want to read this manual.  It describes ZIPKEY in more detail
  192. than the built-in documentation, and provides examples you can
  193. work through as you read.
  194.  
  195. Some of this manual (especially in Chapters 2 and 3) tries to do
  196. double duty, as both a tutorial and a reference guide.  A
  197. tutorial is intended to be read from start to finish; it may
  198. contain a thread of discussion that runs from section to section.
  199. A reference guide is intended to be consulted a section at a
  200. time, to look up specific facts; it may repeat information so
  201. that the user doesn't need to read the whole manual to obtain the
  202. desired fact.  I've tried to keep the tutorial-vs.-reference
  203. annoyances to a minimum: the continuing (tutorial) threads are
  204. restricted to the more elaborate examples presented; I hope they
  205. are easy enough to pick up when you consult a section as a
  206. reference.  And I have tried to organize things to keep
  207. repetitions to a minimum, so you can read the manual as a
  208. tutorial.
  209.  
  210. I would, of course, like you to read this first chapter,
  211. including the legal terms and conditions pertaining to the
  212. program.  Then, if you're just getting started with ZIPKEY, you
  213. should read through Chapter 2 while running ZIPKEY in
  214. demonstration mode, to follow the examples and gain a familiarity
  215. with all of ZIPKEY's search capabilities.  Chapter 3 tells you
  216. how to configure ZIPKEY for memory-resident use, and Chapter 4
  217. tells you how to set up the files on your computer so that ZIPKEY
  218. is permanently available.  Chapter 5 gives you details about
  219. ZIPKEY's built-in facility for creating an order form to
  220. subscribe to ZIPKEY and regularly receive fresh data.  Chapter 6
  221. is for computer programmers who wish to access ZIPKEY's functions
  222. from within their programs.
  223.  
  224.  
  225. Overview of ZIPKEY
  226.  
  227. ZIPKEY is a complete city-level directory of 5-digit United
  228. States zipcodes, combined with a keyboard enhancement program.
  229. The goal of ZIPKEY is to provide enough power and flexibility so
  230. that no one with an IBM-PC (or hardware-compatible computer) will
  231. ever again have to manually type in the name of a United States
  232. city or town (at least not one big enough to have its own
  233. zipcode).
  234.                                                               1-2
  235.  
  236. When run as an ordinary program, ZIPKEY allows you to instantly
  237. access any of the 43000+ zipcodes in the directory, searching by
  238. zipcode, state-and-city, or city-only.  If you want to use ZIPKEY
  239. just to occasionally look up a zipcode, you simply choose
  240. main-menu option 2 and follow the prompts.
  241.  
  242. ZIPKEY achieves its full power when installed permanently in
  243. memory.  In this "memory-resident" mode, you can invoke ZIPKEY
  244. from within any other program (a word processor, a data-base
  245. manager, etc.).  You can type just a 5-digit zipcode, and ZIPKEY
  246. will fool the program you're running into thinking that you have
  247. typed any or all of the following: the city name, the state name
  248. and/or abbreviation, the zipcode, and any other combination of
  249. fixed keystrokes.  This "keystroke output" can be in any format
  250. that you wish.
  251.  
  252. ZIPKEY is completely configurable.  You can specify any
  253. combination of keystrokes (the "hotkey") that will invoke ZIPKEY
  254. when you're running another program.  You can also specify
  255. alternate hotkeys to allow differing sources of zipcode
  256. specifications (repeat the last zipcode, use a fixed sequence of
  257. first digits, or get the zipcode from your screen), and/or a
  258. differing format when ZIPKEY feeds the city/state/zip back
  259. through your keyboard.  You may have up to 99 different hotkeys.
  260. Your configuration is stored in a disk file, which is
  261. automatically read by ZIPKEY whenever it is invoked.
  262.  
  263. ZIPKEY has a sophisticated abbreviation algorithm, allowing you
  264. to specify a limit to the length of the city name, so that it
  265. will fit into a fixed field.
  266.  
  267. ZIPKEY's database is based on data from numerous sources,
  268. including the U.S. Postal Service.  It has been extensively
  269. cross-checked to ensure accuracy and consistency.  The data is
  270. highly compressed, so it won't occupy very much space on your
  271. disk or in memory.  The compression method was custom-designed
  272. for this database, providing for maximum compaction while
  273. retaining instant access.  It occupies less than 128K bytes (less
  274. than 3 bytes per entry), small enough to allow installation of
  275. the data base in either LIM-EMS or main memory.  But access to
  276. the data is fast enough so that it is perfectly reasonable to
  277. leave the database on your hard or RAM disk.
  278.  
  279.  
  280. Operating Requirements
  281.  
  282. ZIPKEY requires an IBM-PC, IBM-PC AT, or 100% hardware-compatible
  283. computer with at least 256K bytes of memory, running MS-DOS V2.0
  284. or later.  A hard disk is not required but is recommended unless
  285. you have lots of memory to store ZIPKEY's data after it is
  286. installed.
  287.                                                               1-3
  288.  
  289. Most of the "clone" computers work fine running ZIPKEY.  The
  290. areas of compatibility needed are in the memory-mapping of the
  291. video interface, the BIOS variables and buffers managing both
  292. video and keyboard, the timer-interrupt hardware, and the
  293. keyboard-interrupt mechanism.  Some computers are compatible
  294. except for the mapping of internal codes passed from the keyboard
  295. to the computer.  For those computers, ZIPKEY will work properly
  296. except during configuration, when the wrong names are displayed
  297. for the hotkeys.
  298.  
  299.  
  300. Legal Terms
  301.  
  302. ZIPKEY is a copyrighted work -- it is not and never has been in
  303. the public domain.  Each release of the ZIPKEY program comes in
  304. two versions: ZIPKEY.EXE, the evaluation copy, may be copied and
  305. distributed to others, subject to the conditions I'm about to
  306. describe.  The other version ZIPKEY.COM, the registered user's
  307. copy, is subject to the same legal restrictions as
  308. traditionally-distributed ("commercial") software.  Neither
  309. version has any physical copy-protection schemes.
  310.  
  311. WARNING: Before installing this or ANY new software, you should
  312. BACK UP any valuable data on your computer system.  ZIPKEY has
  313. been extensively tested on numerous different machines, and it is
  314. believed to be reliable and non-harmful.  However, software is
  315. the most complicated kind of product there is.  No mortal human
  316. can be absolutely and completely certain that a piece of
  317. complicated software will work on any given machine.  So you are
  318. completely responsible for determining the fitness or usability
  319. of this package.  I will not be liable for damages of any kind,
  320. including but not limited to lost sales or profits, arising from
  321. any failure of this package to perform as expected.
  322.  
  323. If you have the evaluation copy ZIPKEY.EXE, I hereby grant you
  324. permission to install this version of ZIPKEY in its
  325. memory-resident mode for up to one month.  After that, you must
  326. either remove ZIPKEY from your system, or subscribe -- option 5
  327. of the main menu (described in detail in Chapter 5) will create
  328. an order form for you.
  329.  
  330. If you have the registered copy ZIPKEY.COM, you may install it
  331. only on those computers servicing the keyboards you have
  332. licensed.  You may make copies for backup and archival purposes.
  333. You may not allow the registered copy to be run from more
  334. keyboards than you have licensed.  The license for running ZIPKEY
  335. in its non-memory resident (demonstration) mode is permanent --
  336. you don't need to renew unless and until you want fresh data.
  337. The license for running ZIPKEY in its memory-resident mode
  338. (hotkeys, key playback, and/or program interface) is paid by the
  339. year, according to the rate schedule published in Chapter 5, and
  340. built into the order-form section of ZIPKEY, option 5 of ZIPKEY's
  341. main menu.
  342.                                                               1-4
  343.  
  344. A simple registration for a single keyboard, with printed manual
  345. and one disk with the latest data, is $30.  Again, the license is
  346. permanent if you use ZIPKEY only in demonstration mode; it is
  347. good for one year if you use ZIPKEY in memory-resident mode.
  348.  
  349. If you are a casual user -- only calling up ZIPKEY occasionally
  350. in non-memory-resident mode for private, non-commercial use --
  351. then your subscription is optional.  You may send however much
  352. money you feel the program is worth to you.  If you send $30
  353. ($31.50 in Indiana), you'll get the printed manual and a disk
  354. with the registered version of the program and the most current
  355. database.  Your support is much appreciated, and will encourage
  356. the continued production of high-quality "try before you buy"
  357. software.
  358.  
  359. I reserve the legal right to change legal terms and prices for
  360. future versions without prior notice.  At the present time I have
  361. no plans to change prices until inflation has seriously reduced
  362. the value of the dollar (by, say, at least a third off its 1989
  363. value).  I will never consider you committed to a higher price
  364. before being advised of the price-- you'll always have the option
  365. to cancel your subscription and receive a refund for unused time.
  366.  
  367.  
  368. Legal Conditions for Free Distribution
  369.  
  370. Here are the conditions for free distribution of the evaluation
  371. version of ZIPKEY:
  372.  
  373. 1. You may copy the disk-file version of this manual, the
  374.    evaluation version ZIPKEY.EXE, and any version of ZIPKEY.OVL
  375.    more than six months old, and give them to anyone who accepts
  376.    all the legal terms spelled out in this chapter.  The copies
  377.    you distribute must be complete and unmodified.  You are
  378.    specifically prohibited from distributing the ZIPKEY.OVL data
  379.    in any unpacked format, or any format other than ZIPKEY.OVL.
  380.  
  381.    Each ZIPKEY.OVL file that I distribute begins with a copyright
  382.    message containing the date after which the file can be
  383.    distributed freely.
  384.  
  385. 2. No part of ZIPKEY may be sold to anyone without my prior
  386.    written permission.  If the package is distributed on a
  387.    diskette, any fees collected must be specified as
  388.    materials/handling, and may not exceed $10 for the diskette.
  389.    Thus, I am allowing shareware distribution houses to
  390.    distribute the evaluation version of ZIPKEY, as long as they
  391.    don't try to deceive their customers into thinking they have
  392.    bought the full rights to the program.
  393.  
  394. 3. I reserve the right to prohibit specific individuals and/or
  395.    companies from distributing any or all of my copyrighted
  396.    works.  If I exercise this right, I shall inform such
  397.    individuals/companies in writing, by certified letter.
  398.                                                               1-5
  399.  
  400.    So far, I have exercised this right against only one company,
  401.    Sizzleware.  They received a prohibition against distributing
  402.    my A86/D86 packages after they marked the packages Public
  403.    Domain in their catalog, and then neglected to change the
  404.    entry in the next catalog.  The subsequent catalog was
  405.    published three months after I wrote them and they wrote back
  406.    saying they would make the change.  It is my impression that
  407.    this was sheer carelessness on their part; but the mistake,
  408.    particularly after they were notified and had three months to
  409.    correct it, was a grave one.  I consider the prohibition
  410.    necessary to protect my copyright.  The prohibition will be
  411.    lifted if and when they publish a catalog with a corrected
  412.    entry for A86/D86.
  413.  
  414.  
  415. Sources and Copyright Status of ZIPKEY's Database
  416.  
  417. ZIPKEY's database consists of over 43000 zipcode entries,
  418. covering over 31000 different cities and towns.  It was created
  419. using numerous different references, most notably the data files
  420. provided by the U.S. Postal Service correlated against the cities
  421. and zipcodes from the 150000-entry database of a fair-sized mail
  422. order firm.  The latter "real-world" data provided much better
  423. accuracy in terms of the city names people actually use for their
  424. own addresses, as opposed to the Postal Service's
  425. officially-designated "primary city" for a zipcode.  The
  426. following references were also used, as a part of an extensive
  427. cross-checking and verification effort:
  428.  
  429.    * zipcode maps from several dozen telephone directories
  430.  
  431.    * U.S. Census data files
  432.  
  433.    * USPS National Five-Digit Zip Code & Post Office Directory
  434.  
  435.    * AAA Road Atlas
  436.  
  437.    * Rand McNally Commercial Atlas and Marketing Guide
  438.  
  439.    * National Atlas of the United States of America
  440.  
  441.    * Rand McNally Road Atlas
  442.  
  443. The resulting ZIPKEY database differs by thousands of entries
  444. from any database that could be derived by mechanical means from
  445. any of the sources I have mentioned.  It is much more accurate
  446. than any of the sources for its purpose: to provide the city name
  447. actually used by the most people in a given zipcode.
  448.                                                               1-6
  449.  
  450. So the ZIPKEY database contains a large body of information that
  451. is public knowledge, but at the same time represents a
  452. substantial creative compilation effort.  It enjoys the same
  453. copyright protection as other reference works, such as
  454. dictionaries, that contain compilation effort.  You may use the
  455. ZIPKEY database as a reference source, but you cannot simply
  456. unpack and publish the database without independently
  457. cross-checking and verifying the entire work, and adding
  458. substantial effort to make it your own.  If you do such
  459. unverified publishing, you will be in violation of federal
  460. criminal copyright law.
  461.  
  462. Note that a skilled programmer can use ZIPKEY's programmatic
  463. interface to unpack ZIPKEY.OVL into an ASCII format.  Again, I
  464. emphasize that the data in ASCII still contains my creative
  465. compilation effort, and is still under my copyright.  You may
  466. create and manipulate such a data file from the keyboards for
  467. which ZIPKEY is licensed, but you are specifically prohibited
  468. from distributing such data to non-licensed computers, or in any
  469. printed format.
  470.  
  471.  
  472. Difference Between the Evaluation and Registered Versions
  473.  
  474. The evaluation copy of ZIPKEY has full functionality.  The only
  475. differences between the evaluation and registered versions are as
  476. follows:
  477.  
  478. 1. The evaluation version is distributed as an EXE file, and the
  479.    registered version is distributed as a COM file.
  480.  
  481. 2. The version number, that appears on the console when ZIPKEY is
  482.    run and also on the signon popup window, has an "e" appended
  483.    to it for the evaluation copy, and an "r" appended to it for
  484.    the registered copy.
  485.  
  486. 3. Some of the help messages of the program are different, to
  487.    reflect the program's registered vs. evaluation status.  But
  488.    there is no missing information in the evaluation copy.
  489.  
  490. 4. When you install in memory the evaluation copy of ZIPKEY on or
  491.    after the second month after you have created a ZC file,
  492.    ZIPKEY will remind you at installation time (typically when
  493.    the computer is started up) that you need to register, and
  494.    invite you to fill out an order form.  You can type N to the
  495.    invitation and ZIPKEY will be installed normally and work just
  496.    fine.  I'm just hoping you'll get tired of having to type that
  497.    N every time you start your computer, and send for the
  498.    registered copy.
  499.  
  500. 5. The evaluation copy will refuse to install a ZIPKEY.OVL
  501.    database whose free distribution is not yet allowed (less than
  502.    six months old).  If everyone follows the distribution rules,
  503.    this prohibition should never be encountered.
  504.                                                               1-7
  505.  
  506. Naming Conventions for Distribution
  507.  
  508. This section describes the naming conventions I'd like you to use
  509. when distributing files, especially on bulletin-board systems.
  510. I'm not putting any legal insistence behind these conventions;
  511. I'm just giving them so that there can be standardization.  If
  512. their names follow these conventions, my files should be easier
  513. to find on BBS's, and there should be less duplication of
  514. identical files with different names.
  515.  
  516. If you distribute files in a compressed format, using PKZIP, ARC,
  517. ZOO, or a similar program, I recommend that the evaluation
  518. ZIPKEY.EXE file and the manual be packed together into one file,
  519. and the ZIPKEY.OVL file be provided as a second file.
  520.  
  521. If you are a BBS sysop, with the ability to delete files on your
  522. BBS, you can maintain the single name ZIPKEY for the package.
  523. The compressed EXE-and-manual file can have the extension (.ZIP,
  524. .ARC, etc.) reflecting the compressing program used.  The OVL
  525. file can keep its name ZIPKEY.OVL.  ZIPKEY.OVL does not need to
  526. be compressed-- it's already so compact that there is little or
  527. no further gain from compression.
  528.  
  529. If you are uploading to a BBS on which you cannot delete the
  530. previous version, I suggest that the names contain the version
  531. information. The EXE-and-manual file should be named ZKxx, where
  532. xx is the ZIPKEY.EXE version number -- for example, ZK10.ARC for
  533. ZIPKEY V1.0e.  The ZIPKEY.OVL file should be stored using a
  534. compression program (not for the compression, which is minimal,
  535. but so that the file will be named ZIPKEY.OVL again when it is
  536. extracted).  The compressed OVL file should be named ZKmmyy,
  537. where mm is the 2-digit month and yy is the year of the ZIPKEY
  538. database -- for example, ZK0988.ARC for the September, 1988
  539. version of the data.
  540.  
  541. Here are sample directory lines for ARC files, including
  542. recommended comment lines:
  543.  
  544. ZK10.ARC         ZIPKEY zipcode dir V1.0 prog/doc, 1 of 2
  545. ZK0988.ARC       ZIPKEY.OVL 09/88 zipcode data,    2 of 2
  546.  
  547. Note that the data file does NOT contain the program version
  548. number in its comment line.  I will be releasing new data files
  549. more often than new program versions, so that the data file is
  550. not married to the program version number.  People will be able
  551. to download new data files even if they already have the latest
  552. program version.
  553.                                                               1-8
  554.  
  555. About the Author
  556.  
  557. I am a professional software author.  I have been programming for
  558. myself since 1965, and professionally since 1975.  I worked for
  559. Intel Corporation for several years, first as a subcontractor,
  560. then as an employee, and then as an independent contractor.  I
  561. have also done contract work for numerous other software firms.
  562. In 1986 I started marketing programs directly to the public,
  563. releasing my A86 assembler and D86 debugger packages as
  564. shareware.  I have been making a living from A86/D86 receipts
  565. since 1987, supporting myself, my wife, and my daughter.  A86 is
  566. my first (computer) love, and I will continue to support and
  567. improve it-- ZIPKEY was developed using A86/D86, and I refuse to
  568. write code using anyone else's compilers.  But the market for
  569. assemblers is rather narrow, fiercely competitive, and
  570. surprisingly crowded with products.  I don't think I'll make
  571. enough from A86/D86 alone to see me through my retirement years.
  572.  
  573. Enter ZIPKEY.  In the summer of 1988 I was persuaded by a friend
  574. that the world needed a zipcode-directory and
  575. keyboard-enhancement program.  I naively thought I could complete
  576. the program in about ten weeks.  At my level of experience I
  577. should have known better-- the project has taken about seven
  578. months of full-time work.  (My only consolation for this
  579. scheduling embarrassment is that another friend of mine, with
  580. even more experience in computers than I have, thinks that he
  581. could have produced a marketable product in about one week!)  The
  582. resulting product is much more powerful and elaborate than the
  583. original vision.  The extra time spent also reflects the
  584. difference between a software tool and a professional-quality
  585. software product -- self-documentation, internal error detection
  586. for "bullet-proof" operation, configurability to anticipate a
  587. wide range of uses, and extensive testing in the field to enhance
  588. the program's design as well as its reliability.
  589.  
  590.  
  591. How to Contact Me
  592.  
  593. I have no plans to move from my present location at least through
  594. the millenium.  So you can write to:
  595.  
  596.     Eric Isaacson Software
  597.     416 East University Ave.
  598.     Bloomington, IN 47401-4739
  599.  
  600. or call (812)339-1811.
  601.  
  602. Sorry, I can't guarantee to return everybody's long distance
  603. calls.  If you'd like to be SURE I'll get back to you, please
  604. invite me to call you back collect, or tell me to charge the cost
  605. of the call to your credit card.
  606.                                                               1-9
  607.  
  608. I also accept BBS mail at PC-Link Central, (812)855-7252, which I
  609. try to check into daily.  Type J 3 when you get on that system,
  610. to reach my conference.  Another BBS which I check into about
  611. twice a week is Indiana On-Line, at (812)332-7227.  I also check
  612. into Compuserve every 10 days or so-- my ID number there is
  613. 71520,74.
  614.  
  615. PLEASE contact me if you find bugs in my programs; I'll fix them!
  616. I accept bug reports from anyone, registered or non-registered,
  617. no questions asked.  It's very frustrating to hear about people
  618. telling each other about bugs, and not telling me.  I still await
  619. Greg Wettstein's bug list.
  620.  
  621. CHAPTER 2   LOOKING UP ZIPCODES
  622.  
  623.  
  624. In this chapter we'll explore all of ZIPKEY's search
  625. capabilities, accessible from ZIPKEY's popup window.  As you read
  626. along, you can execute the examples given from ZIPKEY's
  627. demonstration mode, which pops up the ZIPKEY window without
  628. installing ZIPKEY as a program permanently resident in your
  629. computer's memory.  Occasionally I'll talk about what happens in
  630. the keystroke playback sequence, which occurs in ZIPKEY's
  631. memory-resident mode.  Those features will show themselves after
  632. you've configured ZIPKEY and then installed the program
  633. permanently in memory, as described in Chapters 3 and 4.
  634.  
  635.  
  636. Demonstration Mode
  637.  
  638. You can enter ZIPKEY's demonstration mode by selecting option 2
  639. from ZIPKEY's main menu, or directly from the DOS command prompt
  640. by typing
  641.  
  642.    ZIPKEY 2
  643.  
  644. followed by the Enter key.  If there is enough memory, ZIPKEY
  645. will load the entire zipcode database into memory for the
  646. demonstration.  If you are running ZIPKEY from a floppy disk,
  647. this will take a few seconds (but the subsequent searches will be
  648. breathtakingly fast if you're accustomed to floppy access speeds
  649. for data lookup).  After the data is loaded, ZIPKEY's window will
  650. pop up onto your screen, with the ZIPKEY signon message.  As long
  651. as any ZIPKEY window is on the screen, it will tell you what
  652. ZIPKEY expects you to be typing next, at or near the blinking
  653. cursor.  Whenever the popup window is visible (whether in
  654. demonstration mode or memory-resident mode), you can return to
  655. the signon window by pressing the Home key, or you can pop away
  656. the window by pressing the Esc key.
  657.  
  658. Whenever a zipcode specification is complete, ZIPKEY invites you
  659. to confirm the entry by typing the Enter key.  In demonstration
  660. mode, this will simply return you to the signon window, ready to
  661. type another specification.  Later, when you install ZIPKEY as a
  662. memory-resident program, the confirming Enter will initiate the
  663. keystroke playback sequence, in which ZIPKEY fools your computer
  664. (and whatever program you are running) into thinking you have
  665. typed a complete city/state/zip combination.
  666.  
  667.  
  668. Signon Window
  669.  
  670. The signon window contains information establishing my copyright
  671. and advertising my name and address.  It also tells whether you
  672. are running the evaluation copy of the program or the registered
  673. user's copy.  This information exists to remind you that ZIPKEY
  674. is not in the public domain, and that I appreciate being paid for
  675. my efforts.  But it doesn't waste your time-- you can start
  676. typing your zipcode specification right away.
  677.  
  678. The blinking cursor appears just beyond the prompt indicating
  679. each of the three types of zipcode search available to you:
  680.                                                               2-2
  681.  
  682. 1. If you type a digit (0 through 9), ZIPKEY treats it as the
  683.    start of a zipcode to look up.
  684.  
  685. 2. If you type a letter, ZIPKEY assumes you are typing a
  686.    two-letter state abbreviation, to be followed by a city name.
  687.  
  688. 3. If you type a question mark, you are signalling ZIPKEY that a
  689.    city name without a state will follow.
  690.  
  691. There is a fourth specification type, not mentioned explicitly on
  692. the window: the quote mark " to repeat the last zipcode.
  693.  
  694. We'll discuss each search type individually in the following
  695. sections.
  696.  
  697.  
  698. Zipcode Search
  699.  
  700. The zipcode search is simple: you type in a five-digit zipcode,
  701. and ZIPKEY instantly tells you the associated city, if there is
  702. one.  If there isn't, ZIPKEY will tell you, and try to make a
  703. guess as to what city it might be. You can either accept the
  704. guess with a confirming Enter key, correct the entry with the
  705. backspace key, or explore nearby zipcodes with the arrow keys
  706. (described shortly).
  707.  
  708. ZIPKEY is so fast that it can afford to display intermediate
  709. results as you type each digit of the zipcode.  Most people will
  710. ignore these results when typing in most zipcodes-- they are
  711. frills added to make ZIPKEY a little more convenient (and more
  712. fun).  Here is a description of what you see after each digit,
  713. that you can follow while typing the sample zipcode 47125:
  714.  
  715. 1. After you type one digit, ZIPKEY lists the possible states
  716.    having zipcodes with that first digit.  If a state from this
  717.    list has a zipcode after it, that is the only zipcode from
  718.    that state having the indicated first digit.  For example,
  719.    type 4 when you see ZIPKEY's signon window.  The list of
  720.    states includes Wisconsin 49936.  All of Wisconsin's zipcodes
  721.    start with 5, except Alvin, Wisconsin, which gets its mail
  722.    from a nearby Michigan post office and thus has a Michigan
  723.    zipcode.
  724.  
  725. 2. After two digits, ZIPKEY lists the ten zipcode regions that
  726.    begin with those two digits.  In our example, if you type the
  727.    second digit 7, you get a list of Indiana regions for zipcodes
  728.    beginning with 47: 470, 471, 472, etc.  If a third digit
  729.    yields no valid zipcodes, its line is blank on this display.
  730.                                                               2-3
  731.  
  732. 3. After three digits, ZIPKEY lists the main city for the zipcode
  733.    region.  Zipcodes are organized around three-digit regions:
  734.    all non-local mail is sorted according to region, and shipped
  735.    to a main center for that region.  Only when the mail reaches
  736.    the regional center is it sorted by the last two zipcode
  737.    digits.  Most cities listed by ZIPKEY are the postal service's
  738.    regional centers for those three digits, but many are not.
  739.    The exceptions are the regions surrounding large cities, in
  740.    which the cities themselves have their own first-three digits.
  741.    The postal service considers the large city to be the regional
  742.    center; ZIPKEY will instead typically give the name of a large
  743.    suburb within that region.  For example, the postal service's
  744.    regional center for 471 is Louisville, KY, which handles the
  745.    mail for nearby areas across the Ohio River in Indiana.
  746.    ZIPKEY gives the main city for 471 as Jeffersonville, IN,
  747.    because it gives a better sense of where the region is.
  748.  
  749.    If you type a three-digit combination for which there are no
  750.    valid zipcodes, ZIPKEY will tell you, and ignore any
  751.    subsequent digits typed.
  752.  
  753.    Also included in the three-digit message is a reminder about
  754.    arrow keys during zipcode entry.  We'll discuss arrow keys
  755.    shortly.  The message applies just as well when any number of
  756.    digits are typed-- I placed it there in the three-digit case
  757.    because there is room on the window for it, and because I
  758.    wanted to let people who never read manuals know that the
  759.    feature exists.
  760.  
  761. 4. After four digits, ZIPKEY lists the city for each of the ten
  762.    possible values for the final digit.  If a final digit does
  763.    not have a valid city, its line is left blank.  For example,
  764.    after 4712, you'll see the listing of cities for 47120, 47121,
  765.    47122, etc.
  766.  
  767. 5. Finally, after 5 digits are typed, you get the city, with the
  768.    invitation to confirm the entry with the Enter key.  If there
  769.    is no city for this zipcode, ZIPKEY will guess the last valid
  770.    zipcode's city, or, if the zipcode is before the first or
  771.    beyond the last valid zipcode for the region, ZIPKEY will
  772.    guess the main city for the region.
  773.  
  774.    In demonstration mode, the confirming Enter key will put you
  775.    back to the signon window, ready to type in another zipcode
  776.    specification.  Later, when you run ZIPKEY as a
  777.    memory-resident program, the confirming Enter will pop away
  778.    the window and play the city/state/zipcode combination through
  779.    your keyboard.  The guessed city will be used if the zipcode
  780.    did not exist.  If you don't want the guessed city to be used,
  781.    you exit via the Esc key, and type in the city/state/zip
  782.    yourself.
  783.                                                               2-4
  784.  
  785. Arrow and Paging Keys During Zipcode Search
  786.  
  787. To allow exploration of ZIPKEY's database, ZIPKEY allows you to
  788. use the up-arrow, down-arrow, PgUp, and PgDn keys at any time
  789. during the entry of a zipcode.  These keys either add or subtract
  790. 1 from the value already typed, letting you "move" through the
  791. database.
  792.  
  793. The up-arrow key subtracts 1 from the digits typed (reflecting
  794. the fact that if the zipcodes were listed in order on a page, the
  795. zipcodes would decrease as you move physically up the page).  The
  796. down-arrow key adds one to the digits typed.  For example, if you
  797. type the single digit 0 to ZIPKEY's signon window, you'll get the
  798. list of states whose zipcodes begin with 0.  You can now press
  799. the down-arrow key repeatedly, to get the states lists for 1, 2,
  800. 3, etc.  You can go backwards by pressing the up-arrow key.
  801. Likewise, you can type the two digits 00 to ZIPKEY's signon
  802. window, then press down-arrow repeatedly to get successive lists
  803. of main region cities.  The value will increment from 09 to 10,
  804. so that the entire list of regions can be cycled through with 100
  805. presses of the down-arrow key.  You get similar results after 3,
  806. 4 and 5 digits -- the 4-digit case is most useful, letting you
  807. page through the individual cities in order.  Holding the
  808. down-arrow key down for auto-repeat with 4 digits typed will give
  809. you a sense of the sheer size of ZIPKEY's database, all packed
  810. into your computer's memory.
  811.  
  812. The PgUp and PgDn keys don't provide any radically new
  813. functionality over the up- and down-arrow keys: they simply work
  814. because you might subconsciously think you are in a
  815. word-processor, and expect them to work.  If you press PgUp or
  816. PgDn after 1, 2, or 4 digits are pressed, you get exactly the
  817. same action as the corresponding arrow key.  If you press PgUp or
  818. PgDn after 3 or 5 digits are pressed, ZIPKEY will drop you back
  819. to the 2- and 4-digit cases, respectively, to give you the
  820. "paging" action you might have expected.  If you have configured
  821. ZIPKEY not to display intermediate results (see Chapter 3 for how
  822. to do this), the PgUp and PgDn keys will temporarily enable the
  823. intermediate-results display.
  824.  
  825. Note that these "exploration" keys do not place you into any
  826. special mode: when the typed zipcode increments or decrements, it
  827. is just as if you had typed in the new digits in the first place,
  828. and you can continue typing the zipcode from the new value.  For
  829. example, any of the following keystroke sequences will get you
  830. from the signon window to zipcode 12345:
  831.  
  832.    12345
  833.    0{down}2345
  834.    2{up}2345
  835.    119{down}{down}{down}{down}45
  836.                                                               2-5
  837.  
  838. State and City Search
  839.  
  840. Now we'll discuss the case in which you know the city and state,
  841. and you want to look up the zipcode.  For this case, you start
  842. from ZIPKEY's signon window, and type the two-letter abbreviation
  843. for the desired state.  If you don't remember what the
  844. abbreviation is, don't worry: just type the first letter of the
  845. state's name, and you'll get a display of all the states, with
  846. their abbreviations, that begin with that letter.
  847.  
  848. Your entry of either the state code or the city name can be in
  849. either lower-case or upper-case: ZIPKEY doesn't care.  I give
  850. them in upper case in the following paragraphs just to make them
  851. easier for you to read.
  852.  
  853. After you type the two-letter state abbreviation, ZIPKEY prompts
  854. you for the city name.  As you type the city, ZIPKEY will look up
  855. all cities within that state that start with the letters you have
  856. typed so far.  As soon as there are 50 or fewer matching cities
  857. (usually after only one or two letters), ZIPKEY generates a
  858. display of matching cities.
  859.  
  860. For example, suppose you need to know the zipcode for Robinson,
  861. Illinois.  When you see the ZIPKEY signon window, you can type IL
  862. for Illinois, followed by the city name.  There are more than 50
  863. towns in Illinois whose name begins with R, so you don't get a
  864. display if you type just R.  But after you type the second letter
  865. O, a display is generated.  You may continue typing the city name
  866. until there is only one city left.  Or, once there is a display
  867. of cities, you can type a digit to select one of the cities on
  868. the list.  In the database current to this writing, Robinson is
  869. on the line numbered 3 in the RO display, so the complete
  870. specification ILRO3 will select Robinson.  In the ROB display
  871. Robinson moves up to number 2, so that ILROB2 would also select
  872. Robinson.  Robinson is the only city in Illinois starting with
  873. ROBI, so ILROBI would also select Robinson.
  874.  
  875. If there are more than ten cities in the generated display,
  876. you'll see PgDn displayed off the end of the tenth city.  This is
  877. your indication that the PgDn key will give you more cities.  If
  878. you type PgDn once, you'll get the second ten cities that match
  879. what you've typed so far.  A PgUp appears above the top right of
  880. the cities list, to signal that you can now page back to the
  881. first ten cities.  If there are still more cities beyond this
  882. group of ten, the PgDn indicator will remain.  For example,
  883. suppose you want to view all cities in Oregon whose name begins
  884. with the letter B.  You type ORB to the ZIPKEY signon window,
  885. followed by several PgDn keys to reveal several pages of Oregon
  886. "B"-cities.
  887.                                                               2-6
  888.  
  889. Multiple Zipcode Cities
  890.  
  891. If you perform a city search for a city having more than one
  892. zipcode, ZIPKEY will give you the complete list of zipcodes for
  893. that city, but it can't tell you which zipcode matches your
  894. address-- that's beyond the scope of ZIPKEY's city-level data
  895. base.  In this case, once the search has narrowed down to the
  896. single city, ZIPKEY invites you to complete the zipcode with the
  897. trailing digits it needs to resolve the multiple-zip ambiguity.
  898. In ZIPKEY's demonstration mode, this will serve no purpose other
  899. than to show you how the window will work in memory-resident
  900. mode.  In memory-resident mode, the digits you type are needed to
  901. provide the complete zipcode in the keystroke playback of
  902. city/state/zip.  If you type a confirming Enter at a time that
  903. ZIPKEY is prompting you to complete the digits of a zipcode,
  904. ZIPKEY will fill out the zipcode with x's, just as you might do
  905. when addressing an envelope with a zipcode whose final digits you
  906. don't know.
  907.  
  908. For example, suppose you wish to look up the zipcode for
  909. Worcester, MA.  You type MAWORCES to the ZIPKEY signon window,
  910. which is more than enough to narrow the display to the single
  911. city.  Worcester has numerous different zipcodes, all beginning
  912. with 016.  ZIPKEY places the blinking cursor after the common
  913. digits 016, and invites you to complete the zipcode.  If you type
  914. 01, the prompt changes to a confirming Enter, and you'll get a
  915. keystroke playback of 01601 as the zipcode.  If you type Enter
  916. right away instead of 01, you'll get 016xx as the zipcode.
  917.  
  918. A note about the list of zipcodes for a city: it consists of a
  919. sequence of either individual zipcodes or zipcode ranges.  In a
  920. zipcode range, the first and last zipcodes are always valid
  921. zipcodes for the city displayed.  There will be no zipcodes in
  922. the range that represent a city different than the one displayed.
  923. However, there may be zipcodes within the range that are
  924. undefined.  For example, in the database current at this writing,
  925. the range 01613-55 for Worcester, MA represents a range running
  926. from 01613 to 01655.  You can view the range in detail if you
  927. switch back to zipcode lookup: type Home to return you to
  928. ZIPKEY's signon window, then type 0161 followed by four presses
  929. of the down-arrow key.  You'll see that there aren't any
  930. non-Worcesters between 01613 and 01655, but that most of the
  931. range is undefined.
  932.                                                               2-7
  933.  
  934. City-Only Search
  935.  
  936. ZIPKEY also allows you to search for a city name without
  937. specifying the state.  To use this feature, you type a question
  938. mark to the ZIPKEY signon window.  ZIPKEY will prompt for the
  939. city name, and tell you to press the Enter key when you want the
  940. search to begin.  This search requires ZIPKEY to walk through the
  941. entire zipcode database, which is too slow to display
  942. intermediate results.  You may type either a partial name (the
  943. first few characters), or a complete name.  When you press the
  944. Enter key, ZIPKEY will change the state display to the first
  945. state containing a matching city name, and list the matching
  946. cities.
  947.  
  948. If there are no matching cities, ZIPKEY tells you, and invites
  949. you to correct the entry with the backspace key.  Remember, you
  950. don't have to type the whole city name-- the first few letters
  951. may narrow the possibilities enough for you to find your city
  952. without risking a misspelling.
  953.  
  954. Let's do a sample city-only search.  There's a commercial on TV
  955. in which a woman tells how they prepare Shredded Wheat back home
  956. in Nome.  A co-worker replies, "I didn't know you were from
  957. Alaska.", to which the woman replies, "I'm not; I'm from Nome,
  958. Texas."  As a vigilant ZIPKEY user, you wish to know if there are
  959. any other Nomes out there.  You type ?NOME followed by the Enter
  960. key to the ZIPKEY signon window.  ZIPKEY displays the first
  961. state, Alaska, containing a Nome.  Now read on to the next
  962. section to see how to get the other Nomes.
  963.  
  964.  
  965. Moving From State to State
  966.  
  967. The city-only search just described will give you just the first
  968. state containing a matching city.  To move on to subsequent
  969. states, you press the down-arrow key.  So, from our previous
  970. example, when you have Nome, Alaska selected, you press the
  971. down-arrow key to find the next state containing a matching city.
  972. ZIPKEY reveals a hitherto-unrevealed Nome, in North Dakota.
  973. Pressing down-arrow again moves the display to the Nome, Texas of
  974. the Shredded-Wheat woman.  Another down-arrow cycles us back to
  975. Alaska, so we conclude that there are exactly three Nomes in the
  976. database.
  977.  
  978. What happens when there is a state containing a matching city,
  979. but that is the only such state?  If you press down-arrow, ZIPKEY
  980. will take several seconds to try to find another state, then
  981. return to the same display.  You can tell that the search is
  982. complete because the blinking cursor goes to the state code
  983. during the search, then returns to the city name when the search
  984. is over.
  985.                                                               2-8
  986.  
  987. Again, I've tried to minimize the number of special modes in
  988. which you can be.  When you perform a city-only search, and reach
  989. the first state, it is just as if you had typed that state's code
  990. instead of ? in the first place.  Conversely, if you type a
  991. state-and-city specification, you can move to other states with
  992. that same city specification by pressing the down-arrow key to
  993. move to the next state; or the up-arrow key to move to the
  994. previous state containing a matching city.
  995.  
  996.  
  997. Unabbreviation
  998.  
  999. For consistency and completeness, ZIPKEY's data base stores all
  1000. city names in a totally unabbreviated form, spelling out words
  1001. such as Saint, Sainte, Fort, Mount, North, South, East, and West.
  1002. (The one exception is the word "National" in cities containing
  1003. the phrase "National Park", which is stored as "Natl".  I wanted
  1004. to minimize the number of excessively long city names.)  The
  1005. unabbreviated forms will not cause a problem for you if you need
  1006. to fit your city name into a fixed field, because ZIPKEY does a
  1007. good job of abbreviating names as necessary to fit in such fields
  1008. (details are in Chapter 3).  But you might forget to spell out a
  1009. name such as St. Louis when typing a city specification that you
  1010. would like ZIPKEY to search.  So ZIPKEY allows the abbreviations
  1011. St, Ste, Ft, Mt, N, S, E, and W for the above-mentioned full
  1012. names.  The abbreviations must be followed by a period or a space
  1013. for ZIPKEY to accept them.
  1014.  
  1015. For example, suppose you type MNST to the ZIPKEY signon window.
  1016. You'll get a list of Minnesota cities beginning with ST, and none
  1017. with Saint.  But if you now type a period or space, ZIPKEY will
  1018. switch to a list of Saint cities.
  1019.  
  1020.  
  1021. Repeat Last Zipcode
  1022.  
  1023. Finally, we cover a fourth specification that can be typed from
  1024. ZIPKEY's signon window-- a double-quotes mark " to call up the
  1025. last zipcode returned.  This option exists to accommodate hotkeys
  1026. that repeat the last zipcode specified, and also hotkeys that
  1027. play back a keystroke sequence unrelated to any zipcode.  These
  1028. possibilities are covered, with examples, in Chapter 3, in the
  1029. fixed-keystrokes option of the Zipcode Source section.
  1030.  
  1031. Typing the quotes mark " causes ZIPKEY to display the previous
  1032. zipcode, city, and state found, and immediately prompt for the
  1033. confirming Enter key.  The "previous" zipcode specification
  1034. starts out nonsense (Aaron, AL 00000 in the current database at
  1035. this writing) until a real zipcode is looked up.  The "previous"
  1036. specification does not change if a lookup is cancelled via Home
  1037. or Esc -- it changes only after the confirming Enter or alternate
  1038. exit key is pressed.
  1039.  
  1040. CHAPTER 3   ZIPKEY CONFIGURATION
  1041.  
  1042.  
  1043. In this chapter we discuss how you can tailor ZIPKEY to your
  1044. specific needs.  You can choose where the zipcodes are stored
  1045. when ZIPKEY is loaded into your computer's memory, which keys you
  1046. will press to invoke ZIPKEY, the location and color of the ZIPKEY
  1047. popup window, and the format for the city/state/zip combination
  1048. to be played back though your keyboard.
  1049.  
  1050. These adjustable selections for ZIPKEY are stored in a special
  1051. file on your disk, called a ZC (for ZIPKEY Configuration) file.
  1052. Every time ZIPKEY is installed in your computer's memory, a ZC
  1053. file is automatically read, to determine all of the configuration
  1054. choices you made.
  1055.  
  1056.  
  1057. Determining Your Configuration Needs
  1058.  
  1059. Before you attempt to create a ZC file, you should spend a little
  1060. time exploring how you are currently typing in addresses.  In
  1061. order to let ZIPKEY fool the computer into thinking you have
  1062. typed in a complete city/state/zip, you'll have to tell ZIPKEY
  1063. exactly what you type-- this can include preliminary positioning
  1064. keystrokes, intervening keystrokes for punctuation, spacing, or
  1065. further positioning, and trailing keystrokes for termination or
  1066. still more positioning.
  1067.  
  1068. For example, suppose that you use two different programs to enter
  1069. addresses: a database management program and a word processor.
  1070. Before you try to configure ZIPKEY, you should invoke each
  1071. program and type in a sample address.  You enter the database
  1072. manager, which puts an address template onto the screen.  You
  1073. type in a name and an address, noticing that you use the Enter
  1074. key to move from field to field.  You press the Enter key to
  1075. reach the start of the city field.  At this point, you should
  1076. count the number of available spaces in the city field.  If this
  1077. is visually difficult, the sample name you type can assist you:
  1078. type Xxxx xxxx xxxx xxxx etc. to mark spaces.  Let's suppose
  1079. there are 17 spaces available.  Make a note of this number:
  1080. ZIPKEY will need it.  You press the Enter key to advance the
  1081. cursor to the two-letter state abbreviation field.  You type a
  1082. sample two-letter state code, and notice that the cursor
  1083. automatically advances to the zipcode field without your typing
  1084. Enter -- such a detail is important for the accurate recording of
  1085. the keystroke sequence.  Finally, you type the five-digit zipcode
  1086. and notice that another Enter is required to advance the cursor
  1087. to the next field.  So the exact keystroke sequence for getting
  1088. from the last field before the city to the first field after the
  1089. zipcode is:
  1090.  
  1091. {Enter}C{Enter}AZ{Enter}
  1092.  
  1093. where the variable parts of the entry are denoted by the letters
  1094. C,A,Z.  Again, the lack of an {Enter} between A and Z reflects
  1095. the fact that the cursor moves automatically from the state
  1096. abbreviation to the zipcode field.
  1097.                                                               3-2
  1098.  
  1099. Now you discard the sample record you have created, exit your
  1100. database manager, and invoke your word processor.  You use this
  1101. program to type letters: addresses are typed in as a letterhead.
  1102. The format consists of the city name, a comma, a space, the
  1103. two-letter state abbreviation, a space, the zipcode, and two
  1104. Enter keys.  In our notation, this is
  1105.  
  1106. C, A Z{Enter}{Enter}
  1107.  
  1108. with no limitation to the length of the city name.  You have now
  1109. gathered the information needed for a ZIPKEY specification.  You
  1110. can exit your word processor and invoke ZIPKEY's configuration
  1111. option, described in the next section.
  1112.  
  1113.  
  1114. How to Create a ZC File
  1115.  
  1116. You create a ZC file by selecting ZIPKEY main menu option 3,
  1117. "Configure ZIPKEY for memory-resident use".  You may also go
  1118. directly to this option from DOS's command prompt, by typing
  1119. ZIPKEY 3 followed by the Enter key.
  1120.  
  1121. When option 3 is selected, ZIPKEY tells you whether a ZC file
  1122. already exists, and gives you options just in case it wasn't what
  1123. you expected.  Type N if the file didn't exist, and 2 if it did,
  1124. to walk through a complete configuration.
  1125.  
  1126.  
  1127. Default Options
  1128.  
  1129. The following sections describe each configuration option you'll
  1130. encounter.  Before we begin each option, however, let's discuss a
  1131. feature that covers the entire ZIPKEY configuration process: the
  1132. default option.
  1133.  
  1134. In most situations during ZIPKEY configuration, ZIPKEY attempts
  1135. to discern what option it thinks you are most likely to select.
  1136. It will display that option underneath the current cursor
  1137. position as it waits for your response.  If you wish to select
  1138. this default option, you may do so explicitly by retyping the
  1139. already-displayed selection.  But you can also select the default
  1140. option by simply pressing the Enter key.
  1141.  
  1142. If you are respecifying a previously-existing configuration, the
  1143. default options will be those from the old file.  You can press
  1144. Enter for those sections that you don't want to change.  If you
  1145. are configuring for the first time, the default is the option
  1146. that I think most people will choose.  If you are confused by an
  1147. option and aren't sure what to select, press Enter to get the
  1148. default setting.
  1149.                                                               3-3
  1150.  
  1151. Memory Model
  1152.  
  1153. ZIPKEY consists of two parts: the ZIPKEY program that controls
  1154. ZIPKEY's functions, and the database that contains the zipcodes
  1155. themselves.  When you install ZIPKEY as a memory-resident
  1156. program, the ZIPKEY program is always installed in your main
  1157. computer memory -- it occupies about 20000 bytes (20K of the 640K
  1158. available in most late-model computers).  You don't have any
  1159. choice as to where the ZIPKEY program is stored.  However, you do
  1160. have a choice as to where the database (occupying about 128K) is
  1161. stored:
  1162.  
  1163. 1. You may have the database stored in Lotus-Intel-Microsoft
  1164.    expanded (EMS) memory.  This is a special kind of memory,
  1165.    provided by add-on boards such as Intel's AboveBoard, designed
  1166.    to break the 640K memory capacity "barrier" of the IBM-PC
  1167.    family.
  1168.  
  1169.    If you're not sure whether your system has EMS memory, don't
  1170.    worry: ZIPKEY determines this for you, and makes this option
  1171.    the default if there is sufficient EMS memory available to
  1172.    load the database.
  1173.  
  1174.    If this option is available to you, it is usually the best.
  1175.    It allows the fastest access to the database without occupying
  1176.    main memory, and it avoids any potential problems resulting
  1177.    from attempting to access the disk from a popup utility.
  1178.  
  1179. 2. You may keep the database on your disk, causing ZIPKEY to
  1180.    access the database file every time it looks up a zipcode.
  1181.    This option is slower than the other two options, but not too
  1182.    slow: only two disk read operations (maximum 400 bytes and
  1183.    usually much less) are required to look up each zipcode entry.
  1184.    On a hard disk this takes a small fraction of a second.
  1185.  
  1186.    There is another potential problem with disk access on local
  1187.    area networks (LANs).  I have tested ZIPKEY on several
  1188.    networks, and on all networks it works fine in all modes, with
  1189.    one exception: on a Network-OS network in which the data comes
  1190.    from the disk (not necessarily on the network) ZIPKEY will
  1191.    often refuse to pop up its window until you exit your program
  1192.    and go back to the DOS command prompt.  Much diagnosis
  1193.    revealed that Network-OS was mismanaging an internal DOS flag
  1194.    (InDOS), and deceiving ZIPKEY into thinking DOS was constantly
  1195.    busy.  I have tried repeatedly to persuade CBIS, the company
  1196.    that markets Network-OS, to provide me with some meaningful
  1197.    technical support on this, and so far they haven't.  So if you
  1198.    have the just-described troubles on your network, you may
  1199.    refrain from getting your data from the disk.  Either EMS or
  1200.    main memory work fine on all networks I have tried.  Meanwhile
  1201.    I can't recommend Network-OS-- their system seems to have a
  1202.    bad bug, and their technical support was useless, at least to
  1203.    me.
  1204.                                                               3-4
  1205.  
  1206. 3. You may load the database into main memory.  This allows the
  1207.    same fast access as the EMS option (maybe even a shade
  1208.    faster), but it means that every other program running on your
  1209.    computer will have 128K bytes less memory to work with.  There
  1210.    are many situations in which this won't be a problem: for
  1211.    example, if the computer is dedicated as a workstation for
  1212.    order entry, you can experiment to see if it works just as
  1213.    well with ZIPKEY's data stored in main memory.  If it does,
  1214.    fine: you get the fastest access without having to buy an EMS
  1215.    memory board.
  1216.  
  1217.  
  1218. Intermediate Results
  1219.  
  1220. As an added convenience (and also for fun!) ZIPKEY is capable of
  1221. displaying what it knows about the specification you have typed
  1222. so far.  For example, if you have typed in exactly 4 of the 5
  1223. digits of a zipcode, ZIPKEY will display a list of the 10
  1224. possibilities for the fifth digit.  If you type a partial
  1225. specification and then use the up-arrow, down-arrow, PgUp, and
  1226. PgDn keys, you can "explore" the database.
  1227.  
  1228. There are two reasons why you might want to suppress the display
  1229. of intermediate results: first, to avoid the time it takes to
  1230. look them up.  If you are getting the zipcode data from a slow
  1231. disk, or you are running on an older slow (4.77 MHz) computer,
  1232. then the results are likely to lag a bit behind your typing.  The
  1233. lag is typically no more than about a second-- it's a matter of
  1234. taste whether this is acceptable to you.  The second reason for
  1235. suppressing intermediate results is purely a matter of taste: you
  1236. might be visually annoyed by all that unused information flashing
  1237. past as you type.  If that is the case, however, you may wish to
  1238. choose the option (described later) of taking zipcodes from the
  1239. screen -- that way you can arrange for ZIPKEY's window not to pop
  1240. up at all, which absolutely minimizes the visual distraction.
  1241.  
  1242.  
  1243. Numlock On
  1244.  
  1245. This is a feature inspired by the possibility of using the 5 key
  1246. on the numeric keypad as the "hotkey" that will pop up ZIPKEY's
  1247. window.  If you habitually compute with Numlock turned off, the 5
  1248. key has no other useful function.  If that is the case, since
  1249. your hand is already on the numeric keypad, you may wish to keep
  1250. it there to type in the zipcode.  By selecting this option, you
  1251. are instructing ZIPKEY to activate Numlock when its window pops
  1252. up.  ZIPKEY will restore the old status of Numlock when the
  1253. window pops away.
  1254.                                                               3-5
  1255.  
  1256. Slow Down Keyboard
  1257.  
  1258. This is an option that most users do not need to select.  It
  1259. exists to overcome a problem with some very old programs, most
  1260. notably the WordStar word processor and the Condor database
  1261. system.  The problem arose when Borland, in its Turbo Pascal
  1262. version 2, published a recommended procedure for programs to
  1263. fetch keystrokes from the computer.  The procedure involved
  1264. fetching each keystroke two or three times, relying on the fact
  1265. that no human could type the next key before such multiple
  1266. fetches were made.  This programming method did not foresee the
  1267. advent of keyboard enhancement programs such as SmartKey, ProKey,
  1268. and now ZIPKEY, that simulate keyboard typing at computer speeds.
  1269. Without this option, such older programs will accept only every
  1270. second or third keystroke provided by ZIPKEY.
  1271.  
  1272. If you run Wordstar or Condor, choose Yes for this option.
  1273. Otherwise, if you like to start out cautiously, chose Yes for
  1274. this option, then try No after you have ZIPKEY working.  If
  1275. you're more rambunctious, choose No for this option, and then if
  1276. you see the phenomenon of missed keys in your program, change
  1277. this option to Yes.
  1278.  
  1279.  
  1280.  
  1281. Window Characteristics
  1282.  
  1283. This section of ZIPKEY's configuration allows you to adjust the
  1284. visual characteristics of ZIPKEY's popup window.
  1285.  
  1286. ZIPKEY tries to present you with a window that is both easily
  1287. noticed and unobtrusive.  To be easily noticed, ZIPKEY pops a
  1288. window with a different color than the underlying screen (reverse
  1289. video for monochrome monitors).  To be unobtrusive, ZIPKEY avoids
  1290. popping up in a location that would cover up the current cursor
  1291. location on the screen.
  1292.  
  1293. For windows configuration, ZIPKEY simultaneously pops up two
  1294. windows.  The main window shows where ZIPKEY usually pops up.
  1295. The alternate window shows where ZIPKEY pops up if the main
  1296. window would cover the current cursor position.   You can
  1297. eliminate the alternate window (thus disabling the cursor-dodging
  1298. feature) by pressing the F5 key, which toggles the alternate
  1299. window on and off.  You'll need to disable the alternate window
  1300. if you want the main window to pop up in the middle of the
  1301. screen, where there isn't room on either side for an alternate
  1302. window.  You can swap the main and alternate windows by pressing
  1303. the F6 key.
  1304.  
  1305. During this configuration window display, you can use the arrow
  1306. keys (Up, Down, Left, or Right) to move the main window.  You
  1307. cannot move the alternate window directly, but you can
  1308. temporarily swap the main and alternate windows with F6, move the
  1309. temporarily-main window, and then reswap with F6 again.
  1310.                                                               3-6
  1311.  
  1312. The remaining function keys are used to adjust the colors for the
  1313. popup window.  The internal numeric codes for the colors are
  1314. displayed, so that you can manually record the settings if you
  1315. wish.  There are two function keys for each setting: one to
  1316. decrement the numeric code, the other to increment the code.  F1
  1317. and F2 change the window color (sometimes called the "background"
  1318. color) usually displayed.  F3 and F4 change the text
  1319. ("foreground") color.  If most of the underlying screen (actually
  1320. a diagonal sample of cells, to save time) is the same background
  1321. color as the window's main color, then ZIPKEY uses the alternate
  1322. color, displayed on only four lines of the main configuration
  1323. window.  The alternate window color is adjusted by F7 and F8; the
  1324. text color by F9 and F10.
  1325.  
  1326. When you have completed adjusting the windows to your taste, you
  1327. press the Enter key to pop away the configuration windows, and
  1328. move on to the next stage of configuration.
  1329.  
  1330.  
  1331. Monochrome and Color Window Settings
  1332.  
  1333. If you are installing ZIPKEY on multiple computers, some with
  1334. monochrome screens and others with color screens, then you should
  1335. create your ZC file on one type of screen, and modify it for
  1336. window colors on another computer with the other type of screen.
  1337. ZIPKEY stores separate color codes for monochrome and color
  1338. screens.  When it is installed, ZIPKEY detects whether you have
  1339. color or monochrome.  If you have a color screen, ZIPKEY uses the
  1340. selections you configured on a color screen; if you have a
  1341. monochrome screen, ZIPKEY uses the other selections you made on
  1342. monochrome.  Thus, you don't need to have a different ZC file for
  1343. your monochrome vs. color computers.
  1344.  
  1345.  
  1346. Hotkey Configuration
  1347.  
  1348. All of the options described up to now are global settings-- they
  1349. determine the overall characteristics of ZIPKEY, that don't
  1350. depend on which hotkey was pressed to invoke ZIPKEY.  Now we'll
  1351. discuss the characteristics specific to hotkeys -- they change
  1352. depending on the keystroke combination used to invoke ZIPKEY.
  1353.  
  1354. We recall the example spelled out in the section "Determining
  1355. Your Configuration Needs" earlier in this chapter.  In that
  1356. example, you will invoke ZIPKEY in two different contexts: from
  1357. within a database manager, and also from within a word processor.
  1358. The format for typing city/state/zipcode differs in the two
  1359. contexts.  In the following sections, we'll present one method of
  1360. handling the difference: we'll define two different hotkey
  1361. combinations to invoke ZIPKEY.  One hotkey is to be used while in
  1362. the database manager, and the other hotkey is to be used while in
  1363. the word processor.  Later, we'll talk about other ways to handle
  1364. the difference (with alternate exit keys, or with alternate named
  1365. ZC files).
  1366.                                                               3-7
  1367.  
  1368. Hotkey Name
  1369.  
  1370. The first part of a hotkey specification is its name-- the
  1371. combination of keystrokes you will use to invoke ZIPKEY.  To
  1372. detect hotkeys, ZIPKEY monitors the signals coming directly from
  1373. the keyboard into your computer, so that ZIPKEY can tell when you
  1374. have pressed keys simultaneously.  You should select some
  1375. combination of keys that won't be pressed for any purpose other
  1376. than invoking ZIPKEY.  Often you won't need a combination: you
  1377. might find some individual keys on your keyboard that are
  1378. otherwise unused.  Here are some ideas for hotkeys you can use:
  1379.  
  1380. 1. We've already mentioned the 5 key on the numeric keypad.  Of
  1381.    course, you should only choose this if you habitually keep
  1382.    Numlock off.  Otherwise, you wouldn't be able to use the
  1383.    keypad to type any numbers containing the digit 5.
  1384.  
  1385. 2. Other individual keys that are seldom used are the F11 and F12
  1386.    keys on the newer-generation keyboards, and the SysReq key on
  1387.    the AT keyboard.
  1388.  
  1389. 3. If the computers using ZIPKEY are dedicated to a single
  1390.    purpose, such as order entry, you might get away with using a
  1391.    key, such as back-quote, that wouldn't be suitable in a more
  1392.    general-purpose context. If you do so, you could define
  1393.    Alt-backquote as a special hotkey that produces a back-quote
  1394.    (how to do this is discussed later).
  1395.  
  1396. 4. Exotic combinations of the shifting keys (Shift, Ctrl, Alt),
  1397.    possibly combined with a single non-shifting key, are often
  1398.    used as hotkeys to invoke memory-resident programs.  Examples:
  1399.    Ctrl-RightShift, both Shift keys, Ctrl-Shift-Z, or both Shift
  1400.    keys and Z.  A couple of cautions are in order here: First, if
  1401.    there are other memory-resident programs residing
  1402.    simultaneously with ZIPKEY, you must insure that every
  1403.    programs' hotkeys can be detected by that program.  For
  1404.    example, Ctrl-Alt-Z wouldn't be a good ZIPKEY hotkey if you
  1405.    have Sidekick, because Sidekick would pop in when it saw the
  1406.    Ctrl-Alt.  Second, you should be aware that ZIPKEY
  1407.    distinguishes between left and right shifting keys.  If you
  1408.    don't want ZIPKEY to distinguish, you can define identical
  1409.    hotkeys with each combination.
  1410.                                                               3-8
  1411.  
  1412. 5. If you've used up all the obvious sequences, ZIPKEY allows
  1413.    combinations not usually seen in hotkeys; namely, you can have
  1414.    more than one non-shifting key.  A mnemonic choice would be
  1415.    the Z and C keys simultaneously--they're close together but
  1416.    not adjacent so they won't be pressed accidentally.  This
  1417.    possibility requires an extra consideration: from the
  1418.    computer's point of view, the keys will never be simultaneous:
  1419.    one code will always be received before the other.  ZIPKEY
  1420.    doesn't care which key comes first, as long as the second key
  1421.    is pressed before the first one is released.  But before
  1422.    ZIPKEY can take effect, one of the two keycodes will be seen
  1423.    by the program (e.g. the database manager or word processor)
  1424.    that you're running.  You handle this in your returned
  1425.    city/state/zip keystroke sequence, by specifying the first
  1426.    returned keystroke to be the backspace key, wiping out the
  1427.    escaped key code.
  1428.  
  1429.    Another caution is in order for the most exotic sequences:
  1430.    some keyboards get confused by more than two non-shifting keys
  1431.    pressed simultaneously, and don't deliver all the codes to the
  1432.    computer for ZIPKEY to see. ZIPKEY lets you verify that your
  1433.    sequence is being received correctly, by echoing the sequence
  1434.    for confirmation.  You can experiment with various
  1435.    combinations to see what works, before confirming the name for
  1436.    your hotkey.
  1437.  
  1438. The echoing of your hotkey is based on the internal codes
  1439. delivered by the IBM-PC and 100%-compatible keyboards.   Most
  1440. keyboards are compatible with the IBM-PC, but some aren't.  For
  1441. those keyboards, the echoed names won't match the names of the
  1442. keys as you know them.  However, as long as the echoing is
  1443. consistent (you get the same thing on several tries), the hotkey
  1444. will work correctly when you use ZIPKEY.
  1445.  
  1446. Recalling our database/word processing example: let's assume you
  1447. have a newer-generation keyboard with F11 and F12 keys.  You'll
  1448. use F11 for the database hotkey and F12 for the word processing
  1449. hotkey.  So the first time you are prompted for a hotkey name,
  1450. type the F11 key for the name, and Y to confirm the name.
  1451.  
  1452.  
  1453. Zipcode Source
  1454.  
  1455. Once you have confirmed the name of a hotkey, ZIPKEY next asks
  1456. for the first action it should take when you have pressed the
  1457. hotkey.  There are three choices: first, ZIPKEY can simply pop up
  1458. its window and wait for the operator to type a zipcode
  1459. specification.  Second, ZIPKEY can look at the contents of the
  1460. video display, to find a zipcode that already appears on the
  1461. screen.  Third, ZIPKEY can pretend that it has popped up its
  1462. window and that a fixed sequence of zipcode specification
  1463. keystrokes has already been typed.  Let's consider each choice in
  1464. turn:
  1465.  
  1466. 1. The popup-window option is the simplest and most
  1467.    commonly-used.  There are no further configuration choices you
  1468.    need to make for this option.
  1469.                                                               3-9
  1470.  
  1471. 2. The video screen option is used when the zipcode has already
  1472.    been typed at the time ZIPKEY is invoked.  You can use this
  1473.    option to create a hotkey that verifies existing address
  1474.    records, or to create a data-entry scenario in which ZIPKEY's
  1475.    window normally doesn't pop up at all, and so is the most
  1476.    unobtrusive.
  1477.  
  1478.    If you choose to take the zipcode from the video screen,
  1479.    ZIPKEY will look for five consecutive digits on the same line
  1480.    as the cursor, or on an immediately adjacent line, above or
  1481.    below the current line.  If no five-digit sequence is seen,
  1482.    ZIPKEY will pop up a window just as if option 1 had been
  1483.    selected.  If a five-digit sequence is seen but it isn't a
  1484.    valid zipcode, ZIPKEY will pop up its window with that
  1485.    zipcode, and tell you that the city wasn't found.  For the
  1486.    final possibility, a valid five-digit zipcode, you have an
  1487.    option: you can have ZIPKEY pop up its window so that you can
  1488.    confirm the city, or you can have ZIPKEY automatically play
  1489.    back the city/state/zip sequence without popping up at all.
  1490.    If you want to allow the possibility of using alternate exit
  1491.    keys (described later), you must choose to have ZIPKEY always
  1492.    pop up the window.
  1493.  
  1494.    What happens if there is more than one five-digit sequence on
  1495.    the screen? ZIPKEY uses the first sequence it finds, searching
  1496.    in the following order: first, it starts five characters
  1497.    beyond the current cursor position, looking backwards to the
  1498.    start of the current line.  Then it looks from the current
  1499.    cursor position forwards to the end of the current line.  Then
  1500.    it looks backwards from the end to the start of the line above
  1501.    the current cursor position.  Finally, it looks from the start
  1502.    to the end of the line below the current cursor position.
  1503.  
  1504. 3. The fixed-keystroke option is used for a number of
  1505.    special-purpose applications.  For example, if a large number
  1506.    of addresses that you type are in a local area in which the
  1507.    first three zipcode digits are always the same, you may wish
  1508.    to define a hotkey with a fixed-keystroke sequence consisting
  1509.    of those three digits.  Or, if your data-entry scenario
  1510.    includes typing the zipcode twice (as a part of an ID number,
  1511.    then later as a part of the address), you may wish to define
  1512.    an option 1 (popup) hotkey for the first instance of the
  1513.    zipcode, then another, option 3 hotkey for the second
  1514.    instance, with a fixed-keystroke string of "{Enter} to repeat
  1515.    the zipcode.  Finally, you can use this option to make hotkeys
  1516.    to generate keystroke sequences having nothing to do with
  1517.    zipcodes.  To do this, you again use "{Enter} as the fixed
  1518.    input sequence, so that the ZIPKEY window doesn't pop up.
  1519.    Then you specify a playback sequence that doesn't use any of
  1520.    the zipcode entries -- I'll give an example at the end of this
  1521.    chapter.
  1522.  
  1523.                                                              3-10
  1524.  
  1525.    When you choose this option, ZIPKEY prompts you for the fixed
  1526.    keystroke sequence.  Remember, this is a sequence of keys that
  1527.    you could have typed if ZIPKEY's window had popped up.  Thus,
  1528.    it should follow ZIPKEY's popup syntax: either a sequence of
  1529.    digits for a zipcode, or a two-letter state code followed
  1530.    optionally by a (partial or complete) city name, or a
  1531.    question-mark followed by a city name, or the double-quotes
  1532.    mark " to repeat the last zipcode.
  1533.  
  1534.    Note that the Enter key can be included in the keystroke
  1535.    sequence.  Thus you must use another key to tell ZIPKEY right
  1536.    now that you've finished typing the keystroke sequence.  I
  1537.    have chosen the * character as the signal for this, as it
  1538.    isn't a part of ZIPKEY's popup syntax.
  1539.  
  1540.    A common mistake is to confuse this fixed keystroke sequence
  1541.    with the sequence of keys intended to be played back through
  1542.    your keyboard.  If, for example, you provide Bloomington, IN
  1543.    47401* here, ZIPKEY will pretend you had typed BLOO etc. when
  1544.    its window popped up.  It will try to find a state whose name
  1545.    begins with B, tell you there isn't any, and discard the rest
  1546.    of the sequence.  You should instead provide the simpler fixed
  1547.    sequence 47401{Enter}* and give a playback sequence (described
  1548.    shortly) that causes the desired fixed city/state/zip
  1549.    combination.
  1550.  
  1551. In the database management example, you'll choose option 1, to
  1552. pop up a window and wait for the operator to type in the zipcode.
  1553.  
  1554.  
  1555. Keystroke Playback Sequence
  1556.  
  1557. In normal ZIPKEY usage, after the zipcode has been specified and
  1558. the Enter key is typed to confirm the city found, ZIPKEY will
  1559. fool the computer into thinking a complete city/state/zip
  1560. combination has been typed.  This is known as the "keyboard
  1561. playback sequence", whose format you specify now, during the
  1562. specification of your hotkey.
  1563.  
  1564. The playback sequence usually consists of variable parts (city,
  1565. state, zip) that depend on the zipcode, combined with fixed
  1566. parts: the keystrokes that separate the variable parts, such as
  1567. spaces, punctuation marks, and positioning keys.  As you specify
  1568. the playback sequence, you type most of the fixed parts (spaces,
  1569. commas, Enter, Tab, arrow keys, etc.) just as you want them
  1570. played back.  For each variable part, (and for certain fixed
  1571. parts such as backspace and letters) you substitute a letter
  1572. (which you can type in either upper- or lower-case) from the
  1573. following list:
  1574.  
  1575. A  causes the two-letter state abbreviation (in capital letters)
  1576.    to be generated.
  1577.                                                              3-11
  1578.  
  1579. B  causes a backspace to be generated.  This is on this list so
  1580.    you can use the backspace key right now to correct your
  1581.    configuration entry.  You will begin your playback sequence
  1582.    with B if the hotkey name was something like Z C, that causes
  1583.    one letter to escape to the application program.  You can also
  1584.    begin the playback sequence with BBBBB if you used option 2
  1585.    above to read a just-typed zipcode from the video screen, and
  1586.    you wish to replace the zip with city/state/zip in the
  1587.    playback sequence.
  1588.  
  1589. C  causes the name of the city to be generated.  ZIPKEY will
  1590.    abbreviate the name as necessary to fit it into a fixed-sized
  1591.    field.  When you type the C now at configuration time, a
  1592.    window pops up, prompting you to follow the C with the
  1593.    two-digit width you would like the city to fit into. You
  1594.    should type 99 if there is no limit.  A limit of 15 will give
  1595.    you reasonable results in all cases.  A limit less than 15
  1596.    will make some entries undecipherable and/or ambiguous.  A
  1597.    limit of 19 will cause all but a few cities not to be
  1598.    abbreviated at all.  The longest city name in the database is
  1599.    King and Queen Court House (Virginia), which has 26
  1600.    characters.
  1601.  
  1602.    If you type a limit less than 99, ZIPKEY will then ask you to
  1603.    specify whether the playback should follow the city name with
  1604.    a sequence of spaces (or right-arrows, or whatever) to fill
  1605.    out the fixed field.  Most database managers (including the
  1606.    one in our example) won't require this -- they let you type a
  1607.    single key, such as Enter or Tab, to advance to the next
  1608.    field.  You would typically need this padding only if you are
  1609.    using a simple text editor to maintain a fixed-field database.
  1610.    If you need the padding, type F following by the padding
  1611.    character (typically the space bar).  If you don't need the
  1612.    padding, type N and continue the playback sequence by
  1613.    providing the character needed (Enter, Tab, etc.) to advance
  1614.    beyond the city field.
  1615.  
  1616. L  causes the next character to be literalized -- that is, it is
  1617.    output as-is even though it might be on this list.  You can
  1618.    and should literalize all letters played back, just in case
  1619.    future versions of ZIPKEY add new letters to this list.  You
  1620.    can also literalize the * character to cause it to be played
  1621.    back instead of being interpreted as the terminator to this
  1622.    sequence.  For example, you may wish to embellish our
  1623.    word-processing example by appending LDLeLaLr followed by a
  1624.    space to the playback, causing "Dear " to be generated below
  1625.    the letterhead.
  1626.  
  1627. R  is used to retreat back across a variable-length city name.
  1628.    This would be used in a special case in which an address is
  1629.    being generated that might be indented on the page by an
  1630.    unknown amount.  Some text editors might require you to
  1631.    left-arrow back to the start of the name, then down-arrow to
  1632.    the next line to be aligned with the city-line.  You follow
  1633.    the R with the left-arrow key, or whatever other key you wish
  1634.    to be repeated by the length of the city name.
  1635.                                                              3-12
  1636.  
  1637. S  causes the full name of the state to be generated.  Most
  1638.    people will not use S, but instead use A to generate the
  1639.    two-letter abbreviation.
  1640.  
  1641. Z  causes the five-digit zipcode to be generated.  There is one
  1642.    case -- an city search which returned multiple zipcodes in
  1643.    which the operator didn't complete the zipcode -- that x's are
  1644.    provided to complete the zipcode.
  1645.  
  1646. Just as with the fixed input specification, you can include the
  1647. Enter key as part of the sequence of keystrokes.  So you signal
  1648. ZIPKEY that the sequence is complete with the * character.
  1649.  
  1650. Returning to our database example, recall that the keystroke
  1651. sequence used for entering the city/state/zip combination was
  1652.  
  1653. {Enter}C{Enter}AZ{Enter}
  1654.  
  1655. This is what you should type when ZIPKEY asks for the keystroke
  1656. playback sequence.  When you type C, ZIPKEY asks for the maximum
  1657. city width-- you should gave the field width 17.  Then ZIPKEY
  1658. tells you to type F if you need padding, and N if you don't.  You
  1659. don't need padding, so you type N.  The complete specification
  1660. you type, including the terminating *, is
  1661.  
  1662. {Enter}C17N{Enter}AZ{Enter}*
  1663.  
  1664.  
  1665. Multiple Hotkeys
  1666.  
  1667. ZIPKEY allows you to define multiple hotkeys.  (The limit is 99,
  1668. which I hope is much more than anyone will ever need.)  When you
  1669. are setting up a new configuration file, ZIPKEY will invite you
  1670. to define another hotkey after the first hotkey specification is
  1671. complete.  You may also add hotkeys at any point later in time,
  1672. by selecting the appropriate option in the configuration editing
  1673. menu.
  1674.  
  1675. In our example, you answer Y to the invitation to define another
  1676. hotkey, and name the second hotkey F12.  You again choose zipcode
  1677. source option 1, to pop up the window and wait for keyboard
  1678. input.  The keystroke return sequence for word processing,
  1679. including the 99 for unlimited width and the terminating *, is
  1680.  
  1681. C99, A Z{Enter}{Enter}*
  1682.  
  1683.  
  1684. Exit Keys
  1685.  
  1686. We've just seen that one way to specify different keystroke
  1687. playback sequences is to define a different hotkey for each
  1688. sequence.  Another way is to define one or more alternate ZIPKEY
  1689. exit keys.
  1690.                                                              3-13
  1691.  
  1692. The normal method for confirming a zipcode and initiating key
  1693. playback is the Enter key.  If you have defined an alternate exit
  1694. key, you can press that alternate key instead of Enter to confirm
  1695. a zipcode.  The keystroke playback sequence is associated with
  1696. the exit key, and so remains the same no matter what hotkey was
  1697. used to invoke ZIPKEY.
  1698.  
  1699. Since the function keys (F1, F2, etc.) have no other meaning at
  1700. the moment a ZIPKEY specification is waiting for confirmation,
  1701. they are good choices for alternate exit keys.  Let's consider
  1702. our database-and-word processing example.  Suppose you don't have
  1703. a new-generation keyboard with F11 and F12 keys, and you don't
  1704. like exotic keystroke combinations.  You can define only one
  1705. hotkey, numeric 5.  You decide that most addresses will be typed
  1706. in through the database manager, so you specify the database
  1707. return sequence {Enter}C17N{Enter}AZ{Enter}{Enter}* for the
  1708. hotkey.  It will be played back whenever the Enter key is used to
  1709. confirm a zipcode.  For word processing, you define an alternate
  1710. exit key F1, and specify the word-processing sequence C99, A
  1711. Z{Enter}{Enter}* as the playback sequence for F1.  Then, whenever
  1712. an address is being typed to the word processor, it is confirmed
  1713. with F1 instead of Enter, to get the alternate playback.
  1714.  
  1715. You can, of course, have both multiple hotkeys and alternate exit
  1716. keys. This would be desirable, for example, if you wanted to have
  1717. a number of different input combinations (e.g. popup a window
  1718. immediately, take the zipcode from the screen, and several
  1719. different fixed keystroke combinations for different localities),
  1720. combined with a number of different playback sequences.  You
  1721. would define a different hotkey for each input possibility, and
  1722. an alternate exit key for each playback sequence (except the most
  1723. commonly-used sequence, which you specify for every hotkey as the
  1724. sequence used when Enter is pressed to confirm an entry).
  1725.  
  1726.  
  1727. Configuration Editing Menu
  1728.  
  1729. After your configuration specification is complete, ZIPKEY goes
  1730. to the configuration editing menu.  This menu allows you to
  1731. display and/or modify the configuration choices you have made.
  1732. There are display options for the global settings (memory,
  1733. intermediate results, numlock, slow keyboard, and all the window
  1734. settings), the hotkey names, and the exit key names and playback
  1735. sequences.  There are also corresponding modification choices,
  1736. that return you to the appropriate sections of the original
  1737. configuration process.  Again, the default values for the global
  1738. settings are the values you chose before -- if you wish to change
  1739. just a single global setting, choose "Global modify" and then
  1740. just keep pressing Enter until that setting comes up.
  1741.                                                              3-14
  1742.  
  1743. A unique feature available from the configuration editing menu is
  1744. the quick reference document generation.  I do not provide a
  1745. printed quick-reference card as a part of the ZIPKEY software
  1746. package, because much of the useful information contained on that
  1747. card is specific to your configuration.  Instead, this option
  1748. prepares a quick-reference document containing the configuration
  1749. information, that you can print out yourself.  The file is
  1750. written as ZIPKEY.ZQR (ZQR stands for Zipkey Quick Reference) on
  1751. your current disk directory.  You may wish to edit the document
  1752. for formatting before printing it.
  1753.  
  1754.  
  1755. Named Configuration Files
  1756.  
  1757. The final action in the configuration process is to save the ZC
  1758. (Zipkey Configuration) file to your disk, so that ZIPKEY can read
  1759. it every time you install ZIPKEY in memory.  If you will have
  1760. only one configuration, you should use the default file name,
  1761. ZIPKEY.ZC.  You may, however, wish to have different
  1762. configurations, either for different users or for different
  1763. computing contexts.  For example, this would be a third way to
  1764. provide a different playback sequence for the database manager
  1765. vs. word processor case.  You could configure a single hotkey for
  1766. the database, and name its ZC file DATA.ZC.  Then you could make
  1767. another configuration, named WORD.ZC, with a single hotkey for
  1768. the word processor.  Before entering the database manager, you
  1769. always load ZIPKEY using DATA.ZC; before entering the word
  1770. processor, you load ZIPKEY using WORD.ZC.
  1771.  
  1772. When ZIPKEY asks you for the name of the configuration file, you
  1773. do not need to type the file-name extension .ZC, but you can if
  1774. you want.  Any extension other than .ZC will be ignored, and .ZC
  1775. will be used.
  1776.  
  1777. The ZQR file produced by the quick reference document generation
  1778. option is always named after the ZC file.  For example, the ZQR
  1779. file for DATA.ZC is DATA.ZQR.
  1780.  
  1781.  
  1782. Modifying Configuration Files
  1783.  
  1784. You may modify a configuration file at any time, by selecting
  1785. option 3 from the main menu, or by invoking ZIPKEY 3 from the DOS
  1786. command prompt.  You may also include the name of the ZC file in
  1787. the DOS command prompt.  For example, ZIPKEY 3 DATA will cause
  1788. ZIPKEY to look for DATA.ZC.
  1789.  
  1790. If the ZC file you wish to modify is not found, ZIPKEY asks if
  1791. you are configuring it for the first time, giving you the chance
  1792. to change the file name in case you mistyped it.  Conversely,
  1793. you're also given options if the file was found, in case you
  1794. thought you were configuring for the first time.
  1795.  
  1796. The default choice in the configuration editing menu tells you if
  1797. you have made any modifications to the file.  If it is 9 (abort,
  1798. exiting without saving), you haven't modified the file.  If it is
  1799. 8 (disk save), you have.
  1800.                                                              3-15
  1801.  
  1802. More Hotkey Examples
  1803.  
  1804. Here are the complete configuration specifications for a few of
  1805. the scenarios mentioned earlier in this chapter.  To work the
  1806. examples in this section, type ZIPKEY 3, then either walk through
  1807. a configuration process until you get to the "Hotkey name"
  1808. prompt, or select option 4, "Hotkey display, modify, add or
  1809. delete", of the configuration editing menu.
  1810.  
  1811. First, let's configure so that the zipcode comes from the screen,
  1812. and the ZIPKEY window doesn't pop up at all if the zipcode is
  1813. found.  When prompted for the hotkey name, press the back-quote
  1814. key.  Select option 2, "From the zipcode near the current cursor
  1815. position on the screen."  Then type N, you don't want the screen
  1816. to pop up for confirmation if the zipcode is found.  For the
  1817. playback sequence, we'll assume that you want to erase the
  1818. just-typed zipcode and replace it with a letterhead: type
  1819.  
  1820. BBBBBC99, A Z{Enter}
  1821.  
  1822. and terminate with the * key.
  1823.  
  1824. Because we used a displaying key (the backquote key) as the
  1825. hotkey in the previous example, let's define another hotkey that
  1826. generates a backquote.  When prompted for the hotkey name, type
  1827. Alt-backquote.  Select option 3, fixed string, for the zipcode
  1828. source.  ZIPKEY then asks for the fixed specification, and you
  1829. type the double-quotes key " followed by {Enter} and the
  1830. terminating * key.  Your keystroke playback sequence then has
  1831. nothing to do with zipcodes: it is simply the backquote key
  1832. followed by the terminating * key.  Now if you need to generate a
  1833. back-quote, you can type Alt-backquote.
  1834.  
  1835. Next, let's handle the case in which a zipcode is typed twice:
  1836. once as a part of an identification code, and then later as a
  1837. part of the address.  When prompted for the hotkey name, type the
  1838. Z and the 1 keys simultaneously.  For the zipcode source, choose
  1839. option 1, "The operator types it in after the window is popped
  1840. up."  Since you used two non-shifting keys, one of the keys will
  1841. have been fed to your application program: you now wipe it out by
  1842. beginning the playback sequence with B.  Since the city and state
  1843. name aren't part of the identification code, the playback is just
  1844. the backspace and the zipcode: BZ followed by the terminating *
  1845. key.  Next you specify a second hotkey, named with the Z and 2
  1846. keys.  Since you are repeating the zipcode just looked up for the
  1847. identification code, you specify option 3, fixed string, as the
  1848. zipcode source.  ZIPKEY then asks for the fixed specification,
  1849. and you again type the double-quotes key " followed by {Enter}
  1850. and the terminating * key.  Then you type the keystroke playback
  1851. sequence: C17N{Enter}AZ{Enter} followed by the terminating * key.
  1852.                                                              3-16
  1853.  
  1854. Finally, let's do an example in which we provide a fixed field on
  1855. a simple text editor.  The city field will be 19 characters wide,
  1856. starting at column 33 on a line, which is the fourth tab stop.
  1857. It will be followed by the state abbreviation and the zipcode.
  1858. For the hotkey name, press both Shift keys, then press the Z key.
  1859. Choose option 1 as the zipcode source.  For the playback
  1860. sequence, we assume that the Home key will put the cursor at the
  1861. start of the current line, so you can specify
  1862.  
  1863.    {Home}{Tab}{Tab}{Tab}{Tab}C19F A Z*
  1864.  
  1865. which will leave the cursor just beyond the zipcode.
  1866.  
  1867.  
  1868. Conclusion
  1869.  
  1870. This concludes the description of ZIPKEY configuration.  In the
  1871. next chapter we'll discuss how to arrange the ZC file together
  1872. with the other ZIPKEY files, so that ZIPKEY is permanently
  1873. available to you.
  1874.  
  1875. As you have seen, ZIPKEY has a wide array of options.  There is
  1876. often more than one method of handling a given configuration
  1877. requirement.  Which method you choose is often simply a matter of
  1878. personal taste.  If you are intimidated by the choices, then keep
  1879. things simple to start out with.  Like any complex program,
  1880. ZIPKEY will serve you best if you let yourself become familiar
  1881. with it before trying to exploit every feature.
  1882.  
  1883. CHAPTER 4   RUNNING MEMORY-RESIDENT ZIPKEY
  1884.  
  1885.  
  1886. This chapter assumes you have some familiarity with DOS concepts
  1887. and commands-- for example, it assumes you know what a
  1888. subdirectory is, and how to copy a file to a subdirectory.  If
  1889. you aren't very familiar with DOS (you run straight to your
  1890. word-processor and stay there when you turn your computer on),
  1891. you may need to have a DOS-knowledgeable person assist you.
  1892.  
  1893.  
  1894. Installing ZIPKEY as a Memory-Resident Program
  1895.  
  1896. In Chapter 3 we discussed how to create a ZC file to configure
  1897. ZIPKEY to your specific needs.  Once you have done so, you are
  1898. ready to run ZIPKEY as a memory-resident program.  You do so by
  1899. selecting option 4 of the ZIPKEY main menu.  You can also do so
  1900. directly from the DOS command prompt, by issuing the command
  1901.  
  1902.       ZIPKEY 4
  1903.  
  1904. followed by the Enter key.  If you have a ZC file named something
  1905. other than ZIPKEY, you include the ZC file name on the command
  1906. line.  For example, if you have a ZC file named DATA, either of
  1907. the following command lines will load ZIPKEY as a memory resident
  1908. program, using the configuration file DATA.ZC:
  1909.  
  1910.    ZIPKEY 4 DATA
  1911.    ZIPKEY DATA 4
  1912.  
  1913. The process of loading ZIPKEY as a memory-resident program causes
  1914. your computer to exit the ZIPKEY program, and return you to the
  1915. DOS command prompt.  You are now ready to run any other programs
  1916. you choose, but ZIPKEY is still in your computer's memory, ready
  1917. to be activated at any time by the hotkey or hotkeys you chose
  1918. when you configured ZIPKEY as described in Chapter 3.
  1919.  
  1920. As an example, let's assume you have defined a ZC file with the
  1921. two hotkeys we discussed in Chapter 3: one, F11, for use within
  1922. your database manager, and the other, F12, for use within your
  1923. word processor.  Having loaded ZIPKEY as a memory-resident
  1924. program, you can now enter either your database manager or your
  1925. word processor to see if ZIPKEY works.  You reenter your database
  1926. manager, just as you did before you configured ZIPKEY, to type in
  1927. a sample address.  Just as before, the database manager puts an
  1928. address template onto the screen.  You type in a sample name and
  1929. street address; but instead of typing the Enter that will advance
  1930. you to the city field, you type the F11 hotkey instead.  The
  1931. ZIPKEY window pops onto the screen, inviting you to type a
  1932. zipcode specification.  (If it doesn't, see the section "ZIPKEY
  1933. and Other Memory-Resident Programs", later in this chapter.)  You
  1934. may type any specification as described in Chapter 2.
  1935.                                                               4-2
  1936.  
  1937. For most business applications, you will already have the zipcode
  1938. available to you, and you will be using ZIPKEY to make the data
  1939. entry faster and more accurate.  You type in a zipcode, 31625,
  1940. and get the city Barney, GA for confirmation.  You confirm with
  1941. the Enter key.  Now, if you defined your keystroke playback
  1942. sequence to duplicate what you would have typed to your database,
  1943. you should see the city, state, and zip fields of your address
  1944. template filled with the correct values.
  1945.  
  1946. What do you do if the template is not filled correctly?  You need
  1947. to determine if you got the keystroke playback sequence right.
  1948. If the city/state/zip appears to be there but is in the wrong
  1949. fields, then it's likely that you got your cursor-positioning
  1950. keys wrong -- either too many or not enough.  You should repeat
  1951. the exact keystroke sequence used to enter city/state/zip, and
  1952. make sure that is the sequence specified to ZIPKEY's
  1953. configuration.  You can get a listing of what you specified by
  1954. printing out the ZQR (Zipkey Quick Reference) file that you can
  1955. create via option 7 of the ZIPKEY configuration editing menu.
  1956. For example, if you created ZIPKEY.ZQR, type the command
  1957.  
  1958.    COPY ZIPKEY.ZQR PRN
  1959.  
  1960. to the DOS command prompt, and the listing will be sent to your
  1961. printer.
  1962.  
  1963. If ZIPKEY appears to be playing back only every second or third
  1964. letter of the city/state/zip, then your program needs the
  1965. keyboard slowdown option, one of the global settings of the
  1966. configuration.
  1967.  
  1968. In any case, if a configuration change needs to be made, follow
  1969. the instructions in the next section to reinstall a new
  1970. configuration.
  1971.  
  1972. Having checked out the database manager, you need to move on to
  1973. the word processor.  You exit the database and invoke the word
  1974. processor.  You type a sample name and street address.  Instead
  1975. of typing a city name, you press the F12 key, and the ZIPKEY
  1976. window pops up once again.  Now type 23054 to get the entry Fife,
  1977. VA.  When you press the confirming Enter key, the complete
  1978. specification Fife, VA 23054 appears, the the cursor is
  1979. positioned at the second line below.  Again, if you didn't get
  1980. the right results, you need to figure out whether you got the
  1981. playback sequence right.
  1982.  
  1983.  
  1984. Correcting Your Configuration
  1985.  
  1986. If your check-out of memory-resident ZIPKEY revealed some changes
  1987. you need to make in the configuration, you may do so by typing
  1988.  
  1989.    ZIPKEY 3
  1990.                                                               4-3
  1991.  
  1992. followed by the ZC file name if it isn't ZIPKEY, to the DOS
  1993. command prompt.  You should then be told by ZIPKEY that the
  1994. configuration file already exists, at which point you choose
  1995. option 3, to go to the configuration editing menu to modify it.
  1996.  
  1997. The option "Global modify" followed by several presses of the
  1998. Enter key will get you to the "Slow down keyboard" option, which
  1999. you can change to Y if your program was missing regularly-spaced
  2000. keystrokes.  You may wish to temporarily slow down the keyboard
  2001. even if this wasn't the problem, so that you can more easily
  2002. watch the playback to diagnose how you got the sequence wrong.
  2003.  
  2004. The option "Hotkey display, modify, add or delete" will change
  2005. the keystroke playback sequence for a specific hotkey.  You need
  2006. to repeat the specification sequence, giving the hotkey name,
  2007. zipcode source, and the corrected playback sequence.
  2008.  
  2009. When you have made your changes, you can type Enter to the ZIPKEY
  2010. configuration menu, to execute default option 8, the disk save,
  2011. which puts you back to the ZIPKEY main menu.   Press Enter again
  2012. to execute default option 4, to re-install ZIPKEY as a
  2013. memory-resident program.
  2014.  
  2015.  
  2016. Re-installing a New Configuration
  2017.  
  2018. In most cases, you do not need to shut down and restart your
  2019. computer to reinstall ZIPKEY.  You can simply repeat the command
  2020. to install ZIPKEY as a memory resident program-- either option 4
  2021. from ZIPKEY's main menu, or the DOS command ZIPKEY 4 followed by
  2022. the ZC file name if it isn't ZIPKEY.  You may re-install after
  2023. you have modified the ZC file already installed, or you may
  2024. reinstall to change ZC files.  ZIPKEY will detect that it was
  2025. already installed, and simply substitute the new configuration.
  2026. You'll be back at the DOS command prompt, ready to invoke ZIPKEY
  2027. within your programs again.
  2028.  
  2029. There are only two situations in which you need to shut down and
  2030. restart your computer to change configurations:
  2031.  
  2032. 1. If you change the location of ZIPKEY's database -- EMS memory
  2033.    vs. stay-on-disk vs. main memory -- this one change will be
  2034.    ignored when ZIPKEY is re-installed, and not take effect until
  2035.    after the computer is shut down and restarted.
  2036.  
  2037. 2. If the new ZC file is more than 256 bytes bigger than the
  2038.    first ZC file installed, ZIPKEY will tell you that the new ZC
  2039.    file is too big, and the new installation will not take
  2040.    effect.  ZC files are usually much smaller than 256 bytes, so
  2041.    unless you have unusually complicated configurations, you
  2042.    won't have this problem.  If you do, you should make sure that
  2043.    your largest ZC file is loaded first when your computer starts
  2044.    up.
  2045.                                                               4-4
  2046.  
  2047. Making ZIPKEY Permanently Available
  2048.  
  2049. The MS-DOS operating system has a mechanism that allows you to
  2050. specify that certain programs should be run every time your
  2051. computer is started.  You create a file called AUTOEXEC.BAT, on
  2052. the same disk drive from which the operating system is loaded.
  2053. If you have a hard disk system, this is usually drive C.
  2054. AUTOEXEC.BAT is a text file, containing lines that you might type
  2055. to the DOS command prompt to run programs.  Every time your
  2056. computer is started, MS-DOS reads the AUTOEXEC.BAT file and
  2057. pretends that the first commands you typed into your computer are
  2058. the commands in that file.  You can place a line into
  2059. AUTOEXEC.BAT, containing the command to load ZIPKEY as a
  2060. memory-resident program.  For example, if your ZC file is named
  2061. ZIPKEY, you simply place the line
  2062.  
  2063.    ZIPKEY 4
  2064.  
  2065. into your AUTOEXEC.BAT file.  If the ZC file is named DATA, you
  2066. place
  2067.  
  2068.    ZIPKEY 4 DATA
  2069.  
  2070. into AUTOEXEC.BAT.  You'll need a text editor to modify
  2071. AUTOEXEC.BAT.  Your word processor might do the job, as long as
  2072. you make sure that no word-processing control characters are
  2073. inserted -- most word processors have a "plain text" mode for
  2074. this.
  2075.  
  2076.  
  2077. ZIPKEY and Other Memory-Resident Programs
  2078.  
  2079. If you have other memory-resident programs installed at the same
  2080. time as ZIPKEY, you may need to experiment a little to determine
  2081. the best order in which to load the programs.  Memory-resident
  2082. programming is extremely tricky, and the techniques are
  2083. non-standardized and poorly documented.  A resident program must
  2084. monitor all the keyboard's signals to the computer, while passing
  2085. those signals to all the other resident programs as well.  I
  2086. believe ZIPKEY does a good job of this, passing along every
  2087. keystroke received except for its own hotkeys.  But other
  2088. memory-resident programs may not do a good job: they may prevent
  2089. certain keystrokes from being seen by ZIPKEY, so that a ZIPKEY
  2090. hotkey won't pop up ZIPKEY's window.  They may even become
  2091. extremely confused and freeze up your computer when ZIPKEY is
  2092. invoked, forcing you to shut down and restart the computer.
  2093.  
  2094. If ZIPKEY works in its demonstration mode (ZIPKEY 2), but not in
  2095. memory-resident mode (ZIPKEY 4), you should try ZIPKEY with all
  2096. other memory-resident programs removed.  You do this by renaming
  2097. your AUTOEXEC.BAT file to something else. For example, if your
  2098. current directory contains AUTOEXEC.BAT, you can issue the
  2099. command
  2100.  
  2101.    REN AUTOEXEC.BAT AUTOEXEC
  2102.                                                               4-5
  2103.  
  2104. to temporarily remove the .BAT extension from the file.  Then
  2105. shut down and restart your computer.  When the computer is
  2106. restarted, install ZIPKEY as a memory-resident program, and try
  2107. to invoke it with a hotkey.  If ZIPKEY now works, you know that
  2108. some other memory-resident program is interacting poorly with
  2109. ZIPKEY.  You can invoke the other memory-resident programs one at
  2110. a time, trying ZIPKEY after each one, to find the culprit. It's
  2111. possible that they will all load successfully and ZIPKEY will
  2112. still work -- in that case, you simply place the ZIPKEY
  2113. invocation at the start of the AUTOEXEC.BAT file, so it is loaded
  2114. first.
  2115.  
  2116. When you have sorted things out, don't forget to rename your
  2117. AUTOEXEC file back to AUTOEXEC.BAT.
  2118.  
  2119.  
  2120. Finding ZIPKEY Files on Your Disk
  2121.  
  2122. When you set up ZIPKEY to be permanently available, you need to
  2123. make sure that the ZIPKEY files are placed on your disk where
  2124. they can be found.  This section describes how to do so.
  2125.  
  2126. Normally, when you give the name of a disk file to your computer,
  2127. you must let the computer know where it can find the file.  If
  2128. the file is on a floppy drive, you give the letter of the drive;
  2129. for example, A:ZIPKEY.OVL.  If the file is on a hard disk drive,
  2130. you might also need to name a subdirectory on the drive; for
  2131. example, C:\DOS\ZIPKEY.OVL.  To reduce this burden, DOS maintains
  2132. a "current drive" and "current directory", which act as the
  2133. defaults if you don't give a drive letter or subdirectory.  For
  2134. example, the commands
  2135.  
  2136.     C:
  2137.     CD \DOS
  2138.  
  2139. make C the current drive and \DOS the current directory, so you
  2140. can refer to ZIPKEY.OVL instead of C:\DOS\ZIPKEY.OVL.
  2141.  
  2142. DOS's command processor adds an additional embellishment to the
  2143. current-drive-and-directory concept.  When you issue a command
  2144. such as ZIPKEY to DOS, it will look for the program file
  2145. ZIPKEY.COM first in the current directory.  If it doesn't find
  2146. ZIPKEY.COM there, it can be instructed to look in other default
  2147. directories, until ZIPKEY.COM is found.  You specify the list of
  2148. other default directories by the PATH (or SET PATH=) command,
  2149. placed into your AUTOEXEC.BAT file.  For example, your
  2150. AUTOEXEC.BAT file might contain the line
  2151.  
  2152.     PATH C:\DOS;C:\WP
  2153.  
  2154. or the equivalent line
  2155.  
  2156.     SET PATH=C:\DOS;C:\WP
  2157.  
  2158. to specify that programs may be found in the directories C:\DOS
  2159. and C:\WP as well as the current directory.
  2160.                                                               4-6
  2161.  
  2162. For convenience, ZIPKEY also recognizes the PATH command to find
  2163. its auxiliary files: ZIPKEY.OVL and the ZC file.  For example, if
  2164. your AUTOEXEC.BAT does contain the previously-mentioned PATH
  2165. specification, you may place ZIPKEY.COM, ZIPKEY.OVL, and your ZC
  2166. files into the C:\DOS subdirectory.  Just make sure that the PATH
  2167. command in your AUTOEXEC.BAT comes before your ZIPKEY command.
  2168. Then you won't have to worry about what the current directory is
  2169. when ZIPKEY is invoked.
  2170.  
  2171. Alternatively, if you want to keep ZIPKEY by itself on your disk,
  2172. you can either add ZIPKEY's subdirectory to the PATH command, or
  2173. make ZIPKEY's directory the current directory at the time ZIPKEY
  2174. is invoked, with a sequence such as
  2175.  
  2176.    CD \ZIPKEY
  2177.    ZIPKEY 4
  2178.    CD \
  2179.  
  2180. which makes \ZIPKEY the current directory, invokes ZIPKEY, and
  2181. then restores the root directory \ as the current directory.
  2182. \ZIPKEY should be a subdirectory that contains all the files
  2183. \ZIPKEY\ZIPKEY.COM, \ZIPKEY\ZIPKEY.OVL, and \ZIPKEY\*.ZC.
  2184.  
  2185. Note that you must change the current directory if the ZIPKEY
  2186. files are not in a PATH directory.  You cannot replace sequence
  2187. in the previous paragraph to
  2188.  
  2189.    ZIPKEY\ZIPKEY 4
  2190.  
  2191. because ZIPKEY won't be able to find its ZIPKEY.OVL or ZC file.
  2192.  
  2193. The only crucial factor here is the file-finding situation at the
  2194. time ZIPKEY is installed (the ZIPKEY 4 command).  After that, you
  2195. may change the current drive and/or directory to anything you
  2196. want, and ZIPKEY will always find the files it needs.  The only
  2197. exception: if you run ZIPKEY from a floppy disk and you have
  2198. configured ZIPKEY to take its data from the disk, you cannot
  2199. remove the disk containing ZIPKEY.OVL-- it must still be there so
  2200. ZIPKEY can read it.
  2201.  
  2202. When deciding whether to place ZIPKEY into a PATH directory, you
  2203. may wish to consider the ease with which you would like ZIPKEY to
  2204. be invoked for modifying and reloading configurations.  With
  2205. ZIPKEY in a PATH directory, it can be invoked at any time without
  2206. changing the current directory.  If you modify an existing ZC
  2207. file, ZIPKEY will find and rewrite the file wherever it is.  (New
  2208. ZC files are always written to the current directory.)  This is a
  2209. powerful and convenient feature.  On the other hand, if you have
  2210. untutored users on your computer for which you consider such
  2211. power too dangerous, you may deliberately place ZIPKEY in a
  2212. non-PATH directory, to make careless modifications a little more
  2213. difficult.
  2214.                                                               4-7
  2215.  
  2216. Installing Files on a Network
  2217.  
  2218. If you set up your system so that ZIPKEY.OVL is accessed over a
  2219. network, there is an additional optimization you can make: after
  2220. copying ZIPKEY.OVL to its permanent location, you can execute the
  2221. DOS command
  2222.  
  2223.    ATTRIB +R ZIPKEY.OVL
  2224.  
  2225. which makes ZIPKEY.OVL a read-only file.  This allows your
  2226. computer to buffer data without worrying about whether another
  2227. computer has changed the file.  The result is that access is
  2228. speeded up when the same disk sector is read consecutive times.
  2229.  
  2230. CHAPTER 5   GENERATING AN ORDER FORM
  2231.  
  2232.  
  2233. Automatic Order-Form Generation
  2234.  
  2235. Because ZIPKEY is widely available on an evaluation basis, I felt
  2236. it necessary to make it easy for people to realize that ZIPKEY
  2237. isn't free.  So ZIPKEY has a special option 5 on its main menu to
  2238. generate an order for based on your usage, disk requirements, and
  2239. method of payment.  You may also execute this option directly
  2240. from the DOS command prompt, by issuing the command
  2241.  
  2242.    ZIPKEY 5
  2243.  
  2244. followed by the Enter key.  You'll also be invited to generate an
  2245. order form when installing ZIPKEY in memory (using the ZIPKEY 4
  2246. command), in two circumstances:
  2247.  
  2248. 1. If your data is 13 or more months old, you'll be warned that
  2249.    it's out of date.  The postal service regularly makes changes
  2250.    to its zipcodes, so that you need fresh data to insure
  2251.    continued accuracy.  I'll be releasing new ZIPKEY.OVL files
  2252.    based on those changes monthly.  You are required to
  2253.    resubscribe and receive a new disk at least once a year; and
  2254.    you can elect to receive disks more often if you wish.
  2255.  
  2256. 2. If you are running the evaluation version of ZIPKEY, and it is
  2257.    now the second month or later following the first creation of
  2258.    your ZC file, you'll be reminded that your evaluation period
  2259.    has expired, and invited to fill out an order form.
  2260.  
  2261. In either case, if you choose Y to the order-form invitation, you
  2262. will initiate the interactive session described in this chapter,
  2263. after which ZIPKEY will install itself as intended, and
  2264. AUTOEXEC.BAT (if that's where ZIPKEY was invoked from) will
  2265. complete itself.
  2266.  
  2267. If you press N to the invitation, the order-form procedure is
  2268. skipped, and the computer continues normally, installing ZIPKEY
  2269. which will work just fine.  I'm not going to beat you over the
  2270. head with a club; I'm trusting that you'll answer Y eventually.
  2271.  
  2272.  
  2273. ZIPKEY's Schedule of Prices
  2274.  
  2275. The pricing scheme for ZIPKEY is a little unusual in that it
  2276. involves the maximum, not the sum, of two fees.  The basic,
  2277. single-keyboard registration is $30, which buys you a printed
  2278. manual, a disk, and a year's license to run ZIPKEY in
  2279. memory-resident mode.  I felt that if you want disks more often
  2280. than once a year, you should pay more.  And if you wanted to
  2281. license more keyboards you should pay more.  But I also felt that
  2282. if you chose either price-increasing option, you should
  2283. automatically be entitled to the other at no extra cost.  I can't
  2284. explain it beyond that-- it's simply what seems fair to me.
  2285. Hopefully I can implement this scheme without too much confusion,
  2286. thanks to ZIPKEY's ability to figure out your subscription price
  2287. for you.
  2288.                                                               5-2
  2289.  
  2290. So your subscription fee is the greater of two qualifying
  2291. amounts: the materials fee and the license fee.
  2292.  
  2293. The materials fee is $25 for every diskette mailed to you, plus
  2294. $5 for every printed manual mailed to you.  You may copy the
  2295. contents of a single disk onto all computer systems for which you
  2296. have licensed ZIPKEY, so you do not need to order multiple copies
  2297. of the same diskette.
  2298.  
  2299. The license fee depends on the number of keyboards accessing
  2300. ZIPKEY.  Keyboards using ZIPKEY only in its demonstration mode
  2301. (ZIPKEY 2) have a one-time, perpetual license fee fee of $10.
  2302. Keyboards using ZIPKEY as a memory-resident program (hotkeys, key
  2303. playback, and/or program interface) have a sliding scale of
  2304. annual fees: $25 for the first keyboard, $20 each for the second
  2305. and third keyboards, $15 each for the next five keyboards, and
  2306. $10 each for all subsequent keyboards.
  2307.  
  2308. Again, the total charge is the maximum, NOT the sum, of the
  2309. materials and license fees.  This means, for example, that if you
  2310. would like to receive disks quarterly (materials fee $100), you
  2311. may license 5 memory-resident keyboards (license fee $95) for no
  2312. extra charge.  Conversely, if you license a lot of keyboards, you
  2313. may be able to receive disks more often for no extra charge.
  2314.  
  2315.  
  2316. Gathering Your Order Information
  2317.  
  2318. Before answering ZIPKEY's order form questions, you should take a
  2319. census of the number of keyboards you wish to license.  (I refer
  2320. to keyboards, not computers, to resolve questions raised by
  2321. networks.)  The non-resident keyboards are those from which
  2322. ZIPKEY is accessible, and from which occasional ZIPKEY 2 commands
  2323. are issued to look up zipcodes in demonstration mode, but which
  2324. the ZIPKEY 4 command is never issued.  The resident keyboards are
  2325. those for which ZIPKEY 4 is used, to install ZIPKEY in memory,
  2326. and use any or all of the following: hotkeys, keystroke playback,
  2327. or the programmatic interface.  If you use the programmatic
  2328. interface to produce an unpacked zipcode database file from
  2329. ZIPKEY.OVL, then you must also license any keyboards that access
  2330. that database file, even if they don't run ZIPKEY directly.
  2331.  
  2332. You should also decide how you will pay for your order, by
  2333. obtaining either a purchase order number or a credit card number
  2334. (Visa, Mastercard, or American Express), or by seeing to it that
  2335. you can obtain a prepaid check.  Keep in mind that you must be
  2336. either an established customer, a Fortune 1000 corporation, an
  2337. accredited school, or a government agency to issue a non-prepaid
  2338. purchase order.  Also, there is a $5 surcharge for non-prepaid
  2339. purchase orders under $100.
  2340.                                                               5-3
  2341.  
  2342. Answering the Order-Form Questionnaire
  2343.  
  2344. Now you're ready to answer the order-form questionnaire.  You'll
  2345. first be asked the number of non-resident, then resident
  2346. keyboards you are licensing. If this is a simple, one-keyboard
  2347. registration, you'll answer 1 for one of them and 0 for the
  2348. other.  If you are renewing a license, you don't need to
  2349. redeclare the non-resident keyboards-- their license is
  2350. permanent.  You do need to redeclare the resident keyboards.
  2351.  
  2352. What about keyboards that change resident vs. non-resident
  2353. status?  You declare the newly resident keyboards, and not the
  2354. newly non-resident ones.
  2355.  
  2356. Next, ZIPKEY asks for the number of printed manuals you'd like.
  2357. You may order any number from zero up to the number of keyboards
  2358. being licensed.
  2359.  
  2360. Next, ZIPKEY asks for the number of years you are paying for.  I
  2361. expect almost everyone to answer 1 to this question; but I myself
  2362. like to pay off my utilities bills for months in advance, so
  2363. maybe somebody out there will be like that.
  2364.  
  2365. ZIPKEY then asks for the number of disks per year to be
  2366. delivered.  This number multiplied by the previous number gives
  2367. the total number of disks you are paying for with this order.
  2368. You'll get one disk immediately, and the rest in evenly-spaced
  2369. periods.  The disk to be shipped exactly one year from now is
  2370. part of next year's order.
  2371.  
  2372. You are then give a choice of disk type.  Choice 1 is the
  2373. older-generation, 360K flexible-sleeve floppy.  Choice 2 is the
  2374. newer (PS/2 style) hard-shell, 720K disk.
  2375.  
  2376. You are then prompted for your name, address, and telephone
  2377. number, followed by the choices for method of payment.  If you
  2378. choose a credit card or purchase order number, you'll be prompted
  2379. for the additional information.
  2380.  
  2381. After the payment information is given, the order form is
  2382. complete.  The only remaining choice is whether to send the form
  2383. directly to the printer, or to a disk file or device.  Make sure
  2384. your printer is turned on before sending it to the printer.
  2385.  
  2386.  
  2387. Possible Amendments to the Total Price
  2388.  
  2389. The order form that ZIPKEY outputs includes the total price of
  2390. the package calculated for you.  There are only two things that
  2391. could add to the total:
  2392.  
  2393. 1. If your shipping address is in Indiana and you are not exempt,
  2394.    you must add sales tax (5% at this writing) to the total.
  2395.  
  2396. 2. If your shipping address is overseas, add $2 per disk and $3
  2397.    per manual to cover extra postage.  There is no extra charge
  2398.    for postage on domestic orders.
  2399.  
  2400. CHAPTER 6   PROGRAMMATIC INTERFACE
  2401.  
  2402.  
  2403. This chapter is intended for computer programmers who wish to
  2404. access ZIPKEY directly from within their programs.  If you are
  2405. not a computer programmer, you may ignore this chapter.
  2406.  
  2407.  
  2408. The ZIPKEY Interrupt
  2409.  
  2410. When ZIPKEY is installed as a memory-resident program (using the
  2411. ZIPKEY 4 command), it takes over one of the 8086's interrupts,
  2412. INT 179 (decimal; it's B3 in hexadecimal).  This interrupt serves
  2413. two functions: first, it is the method by which ZIPKEY detects if
  2414. it has already been installed.  Second, it provides the interface
  2415. by which computer programs can call ZIPKEY directly, to obtain
  2416. zipcode-related services.
  2417.  
  2418. I conducted a survey of numerous computers before selecting INT
  2419. 179 to be used by ZIPKEY.  I found no computers or peripherals
  2420. that use this interrupt, and I am hopeful that there are none.
  2421. If your computer does use INT 179, then ZIPKEY and the device or
  2422. program using INT 179 will interfere with each other.  You can
  2423. change the interrupt number ZIPKEY uses by modifying the ZIPKEY
  2424. program itself: the number 179 is stored in the fourth byte of
  2425. the ZIPKEY program code, immediately beyond the three-byte JMP
  2426. instruction that begins the program.  This JMP occurs at the very
  2427. start of the ZIPKEY.COM file, or immediately beyond the 512-byte
  2428. header of the ZIPKEY.EXE file.  You can use a debugger or a hex
  2429. editor to modify the byte to an unused interrupt number.
  2430.  
  2431.  
  2432. Testing for ZIPKEY's Presence
  2433.  
  2434. Before you program attempts to call ZIPKEY, it may wish to verify
  2435. that ZIPKEY has been installed, and report an error if it isn't.
  2436. Otherwise, you program may crash when it tries to call code that
  2437. isn't there.
  2438.  
  2439. You can test for ZIPKEY's presence by examining the INT 179
  2440. handler, whose doubleword pointer is stored at offset 179*4 (=716
  2441. =02CCH) within segment 0 of the 8086 memory space.  If ZIPKEY is
  2442. installed, the doubleword points to its code segment.  Location
  2443. 075H within that code segment contains the signature string
  2444. ZIPKEY.  Thus, the following code sequence will check for
  2445. ZIPKEY's presence:
  2446.                                                               6-2
  2447.  
  2448. OUR_ZIPKEY:                ; our copy of the template
  2449.   DB 'ZIPKEY'
  2450.  
  2451. CHECK_FOR_ZIPKEY:
  2452.   PUSH DS                  ; save register value
  2453.   SUB AX,AX                ; load zero
  2454.   MOV DS,AX                ; point DS to 0 -- 8086 interrupts
  2455.   MOV DS,WORD PTR 02CEH    ; fetch the segment part of INT 179
  2456.   MOV SI,075H              ; point to signature in segment
  2457.   PUSH CS                  ; push our code segment
  2458.   POP ES                   ; set ES to our code segment
  2459.   MOV DI,OFFSET OUR_ZIPKEY ; now ES:DI points to 'ZIPKEY'
  2460.   MOV CX,3                 ; there are 3 words in 'ZIPKEY'
  2461.   REPE CMPSW               ; does DS:75H point to 'ZIPKEY'?
  2462.   POP DS                   ; restore register before jumping
  2463.   JZ ZIPKEY_INSTALLED      ; jump if it does match
  2464. ZIPKEY_NOT_INSTALLED:      ; it does not match
  2465.  
  2466. Following the ZIPKEY signature, at offset 07BH within the ZIPKEY
  2467. code segment, is a single byte that is zero in the initial
  2468. version of ZIPKEY, but will increment each time I release a
  2469. ZIPKEY with new features or any other changes to the programmatic
  2470. interface.  That way, if you program needs ZIPKEY to be of a
  2471. sufficiently recent version, it can ensure that it is.  (You can
  2472. also use the version number returned by the ZK_VERSION function
  2473. described shortly.)
  2474.  
  2475.  
  2476. ZIPKEY Calling Conventions
  2477.  
  2478. ZIPKEY's interface works similarly to that of the MS-DOS
  2479. operating system, or the LIM-EMS specification.  The interface is
  2480. specified in 8086 assembly language.  You load a function number
  2481. into the AH register, and possibly other input parameters into
  2482. other registers, then you execute an INT instruction with an
  2483. appropriate interrupt number -- in ZIPKEY's case, the INT 179
  2484. instruction.
  2485.  
  2486. When ZIPKEY has completed the function, it returns control to
  2487. your program at the instruction following the INT 179.  The
  2488. success of the call is indicated by the Carry flag: NoCarry (flag
  2489. = 0) indicates success; Carry (flag = 1) indicates failure.  If
  2490. the Carry flag is set, AL is usually set to an error code (the
  2491. exceptions are those functions which, as mentioned in their
  2492. following descriptions, return the state code for a suggested
  2493. city).  Here are the possible error codes:
  2494.  
  2495. 0FDH is returned if ZIPKEY is busy.  This would happen only if
  2496.      the program calling ZIPKEY had interrupted another program
  2497.      which also happened to be in the middle of a ZIPKEY call.
  2498.      ZIPKEY is not reentrant, so it must refuse calls in this
  2499.      situation.  If you think this interrupted-programming
  2500.      scenario is possible, you should check for this possibility.
  2501.      If ZIPKEY is busy, you should give the interrupted code a
  2502.      chance to complete the ZIPKEY call, and try your call again
  2503.      later.
  2504.                                                               6-3
  2505.  
  2506. 0FEH is returned if you provided an illegal function number in
  2507.      the AH register.
  2508.  
  2509. 0FFH is returned if the searching function requested failed to
  2510.      find a valid entry, or even a suggested value.
  2511.  
  2512. Here are ZIPKEY's register-preserving conventions:  The AX
  2513. register is clobbered by an INT 179 call; but all other 8086
  2514. machine registers are preserved unless they are specifically
  2515. named as having return values.  If a function returns an error,
  2516. such return registers may be clobbered even if they contain no
  2517. values in the return case.  For example, the ZK_STCITY_ZIP
  2518. function returns values in BH, CX, and DX.  Except for AX, all
  2519. other registers not mentioned are preserved (SI,DI,BP,DS,ES).
  2520. The BH, CX, and DX registers may be clobbered even if the search
  2521. fails (and Carry is returned).
  2522.  
  2523.  
  2524. The ZIPKEY Functions
  2525.  
  2526. Following are the functions available to you when ZIPKEY is
  2527. installed. For each function, you load the input registers with
  2528. the values indicated, then invoke INT 179.
  2529.  
  2530. The names of the functions (ZK_VERSION, ZK_ABBR_ST, etc.) have no
  2531. significance to ZIPKEY-- I present them merely as suggested names
  2532. if you wish to implement a library of calls; and also so that I
  2533. can refer to the functions by name.
  2534.  
  2535. ZK_VERSION:   returns ZIPKEY version information.
  2536.  
  2537.     In:
  2538.          AH = 070H
  2539.  
  2540.    Out:
  2541.          AX = The ZIPKEY program version number, as shown when
  2542.               ZIPKEY is invoked or the ZIPKEY window is popped
  2543.               up.  AH is the major version number (to the left of
  2544.               the decimal point) and AL is the minor version
  2545.               number (to the right of the decimal point).  For
  2546.               example, for V1.0 the return AX value would be hex
  2547.               100.
  2548.  
  2549.          CL = The number of states, (and territories, etc.) in
  2550.               the current database.  Each state is assigned an
  2551.               internal numeric code by ZIPKEY, that is used by
  2552.               many of the functions of ZIPKEY's programmatic
  2553.               interface.  These codes range from 0 to CL-1.
  2554.  
  2555.          DX = The date of the current ZIPKEY.OVL database.  DL is
  2556.               the month, ranging from 1 for January to 12 for
  2557.               December.  DH is the year minus 1900; e.g., decimal
  2558.               89 for 1989.
  2559.                                                               6-4
  2560.  
  2561. ZK_ABBR_ST:   converts a two-letter abbreviation into a state
  2562.               code.
  2563.  
  2564.     In:  AH = 071H
  2565.  
  2566.          BX = The 2-letter ASCII abbreviation for the state, in
  2567.               either upper- or lower-case.  BL is the first
  2568.               letter and BH is the second letter.
  2569.  
  2570.    Out:  AL = The ZIPKEY state code, suitable for input to other
  2571.               ZIPKEY functions in this chapter.
  2572.  
  2573.          AL = 0FFH with the Carry flag set if not found.
  2574.  
  2575.  
  2576. ZK_ST_ABBR:   converts a state code into a two-letter
  2577.               abbreviation.
  2578.  
  2579.     In:  AH = 072H
  2580.  
  2581.          BL = The ZIPKEY state code, ranging from 0 through CL-1,
  2582.               where CL is returned by ZK_VERSION.
  2583.  
  2584.    Out:  AX = The 2-letter ASCII abbreviation, upper case.  AL is
  2585.               the first letter and AH is the second letter.
  2586.  
  2587.          The Carry flag is set if the input state code BL was
  2588.          invalid.
  2589.  
  2590.  
  2591. ZK_ST_NAME:   converts a state code into a full state name.
  2592.  
  2593.     In:  AH = 073H
  2594.  
  2595.          BL = The ZIPKEY state code, as returned by ZK_ABBR_ST.
  2596.  
  2597.          ES:DI points to the buffer to contain the returned state
  2598.          name.
  2599.  
  2600.    Out:  The full state name is output to ES:DI-pointed memory.
  2601.          DI is advanced beyond the output.
  2602.  
  2603.          The Carry flag is set if the input state code BL was
  2604.          invalid.
  2605.                                                               6-5
  2606.  
  2607. ZK_ZIP_DIGITS:  converts zipcode DXCH into a ASCII digits string.
  2608.  
  2609.     In:  AH = 074H
  2610.  
  2611.          DX = The zip region, ranging from 0 to 999.
  2612.  
  2613.          CH = The last 2 digits of the zipcode, from 0 to 99.
  2614.  
  2615.    Out:  The 5 ASCII decimal digits of the zipcode are output to
  2616.          ES:DI-pointed memory.  DI advanced beyond the output.
  2617.  
  2618.          The Carry flag is set if DX was greater than 999.
  2619.  
  2620.          NOTE this is not really a database function-- it is just
  2621.          an unpacking function provided for convenience.
  2622.  
  2623.  
  2624. ZK_ZIP_ST:   looks up the state code for zipcode DXCH.
  2625.  
  2626.     In:  AH = 075H
  2627.  
  2628.          DX = The zip region, ranging from 0 to 999.
  2629.  
  2630.          CH = The last 2 digits of the zipcode, from 0 to 99.
  2631.  
  2632.    Out:  AL = the ZIPKEY state code.
  2633.  
  2634.          The Carry flag is set if the zipcode was not found, with
  2635.          AL = 0FFH if there was no suggested state.
  2636.  
  2637.  
  2638. ZK_ZIP_CITY: looks up the state and city for zipcode DXCH.
  2639.  
  2640.     In:  AH = 076H
  2641.  
  2642.          DX = The zip region, ranging from 0 to 999.
  2643.  
  2644.          CH = The last 2 digits of the zipcode, from 0 to 99.
  2645.  
  2646.          ES:DI points to the buffer to contain the returned city
  2647.          name.
  2648.  
  2649.    Out:  The ZIPKEY state code is returned in the AL register.
  2650.          The city name is output to ES:DI-pointed memory.  DI is
  2651.          advanced beyond the output.  If you wish to ensure that
  2652.          the name does not exceed a maximum width, you can set
  2653.          the width using the ZK_RESTORE function.  The Carry flag
  2654.          is set if the zipcode was not found, with AL/DI set to
  2655.          the suggested state/city if there is one.  AL is set to
  2656.          0FFH if there is no suggested city.
  2657.  
  2658.          NOTE that a previous call to ZK_ZIP_ST can and should be
  2659.               made if you wish to suppress output for the
  2660.               not-found-but-suggested case.
  2661.                                                               6-6
  2662.  
  2663. ZK_ZIP_KEYS: plays the back exit key BX for the entry with
  2664.              zipcode DXCH.
  2665.  
  2666.     In:  AH = 077H
  2667.  
  2668.          BX = The 16-bit BIOS keycode for a defined ZIPKEY
  2669.               alternate exit key.  This is the code returned in
  2670.               the AX register after you call the keyboard service
  2671.               routine (MOV AH,0 followed by INT 016H).  For
  2672.               example, the code for the F1 function key on a 100%
  2673.               IBM-compatible is 03B00H; add 0100H for subsequent
  2674.               function keys.
  2675.  
  2676.          DX = The zip region, ranging from 0 to 999.
  2677.  
  2678.          CH = The last 2 digits of the zipcode, from 0 to 99.
  2679.  
  2680.    Out:  If there is a failure with no suggested city, ZIPKEY
  2681.          returns Carry to the caller.  Otherwise, it returns
  2682.          NoCarry, and the zipcode specification defined by the BX
  2683.          exit-key is inserted into the BIOS keystrokes buffer, as
  2684.          if a user had popped up the ZIPKEY window, typed in the
  2685.          zipcode, and exited with the BX exit key.
  2686.  
  2687.  
  2688. ZK_STCITY_ZIP:  looks up the zipcodes for a given state and city.
  2689.  
  2690.     In:  AH = 078H
  2691.  
  2692.          BL = The ZIPKEY state code for the city to be looked up.
  2693.  
  2694.          DS:SI points to the city-name specification.  The
  2695.                specification is a string of ASCII characters,
  2696.                terminated by a carriage-return (0DH) if the
  2697.                complete name has been given, terminated by a null
  2698.                (00H) if ZIPKEY should match any city whose name
  2699.                begins with the specification, whether or not that
  2700.                is the complete city name.  Letters in the string
  2701.                can be in either upper- or lower-case.  ZIPKEY
  2702.                will also unabbreviate the string, as described in
  2703.                Chapter 2.
  2704.  
  2705.    Out:  ZIPKEY accumulates a list of all cities that match the
  2706.          specification given.  The list is sorted first
  2707.          alphabetically by city name, then numerically by
  2708.          zipcode.  Each entry on the list is a range of zipcodes
  2709.          for a city that matches the specification.  If the first
  2710.          and last zipcodes in the range are the same, the range
  2711.          consists of just the one zipcode.  If they are
  2712.          different, then they both represent valid codes for a
  2713.          matching city.  Any zipcodes between the first and last
  2714.          may be either valid zipcodes for the same city, or
  2715.          undefined zipcodes.
  2716.                                                               6-7
  2717.  
  2718.          The capacity of ZIPKEY's matching-entries buffer is 50.
  2719.          If there are more than 50 entries for the specification,
  2720.          ZIPKEY will return a count of 51 entries.  You may make
  2721.          calls to ZK_CASE_ZIP to determine the entries returned,
  2722.          but be aware that unless the complete count happened to
  2723.          be 51, the list is incomplete.  The only way to obtain
  2724.          the complete list of entries is to extend the city-name
  2725.          specification by adding one or more letters in all
  2726.          possible combinations.
  2727.  
  2728.          The zipcode range for the first entry is returned with
  2729.          this call.  To obtain the remaining entries, you make
  2730.          repeated calls to ZK_CASE_ZIP.  To obtain a readable
  2731.          display for each entry, you call ZK_ZIP_CITY, ZK_ZIP_ST,
  2732.          and ZK_ZIP_DIGITS.
  2733.  
  2734.          The return register values are:
  2735.  
  2736.          BH = The number of matching entries (Carry set if BH=0).
  2737.               If ZIPKEY's entries-buffer overflowed, BH is set to
  2738.               51 (see the above discussion about capacity).
  2739.  
  2740.          DX = The zip region (0 to 999) of the first entry.
  2741.  
  2742.          CL = The value of the bottom two digits for the first
  2743.               zipcode in the range.
  2744.  
  2745.          CH = The value of the bottom two digits for the last
  2746.               zipcode in the range.
  2747.  
  2748.  
  2749. ZK_CITY_ZIP:   looks up zipcodes for a given city.
  2750.  
  2751.     In:  AH = 079H
  2752.  
  2753.          BL = The ZIPKEY state code of the first state to be
  2754.               searched.
  2755.  
  2756.          DS:SI points to the city-name specification, just as in
  2757.                ZK_STCITY_ZIP.
  2758.  
  2759.    Out:  ZIPKEY accumulates a list of zipcode ranges, just as in
  2760.          ZK_STCITY_ZIP.  With this function, however, if no
  2761.          matching entries are found for state BL, then BL is
  2762.          incremented to search in the next state.  Searching
  2763.          continues until either a match is found or the last
  2764.          state code is reached.  If there is no matching entry
  2765.          for the last state, ZIPKEY returns AL=0FFH with the
  2766.          Carry flag set.  This differs from the city-only search
  2767.          that is initiated interactively from ZIPKEY's popup
  2768.          window-- the interactive search cycles around to the
  2769.          first state and continues looking from there.
  2770.  
  2771.          To get a complete list of matching cities for all
  2772.          states, you call this function first with BL=0, then
  2773.          repeat the call with BL set to the previous returned
  2774.          AL+1, until you get a failed find.
  2775.                                                               6-8
  2776.  
  2777.          The return register values are:
  2778.  
  2779.          AL = The ZIPKEY state code of the first matching state.
  2780.               AL is set to 0FFH with Carry set if no state was
  2781.               found.
  2782.  
  2783.          BH = The number of matching entries (Carry set if BH=0).
  2784.               If ZIPKEY's entries-buffer overflowed, BH is set to
  2785.               51.
  2786.  
  2787.          DX = The zip region (0 to 999) of the first entry.
  2788.  
  2789.          CL = The value of the bottom two digits for the first
  2790.               zipcode in the range.
  2791.  
  2792.          CH = The value of the bottom two digits for the last
  2793.               zipcode in the range.
  2794.  
  2795.  
  2796. ZK_CASE_ZIP:  fetches an entry from a previous ZK_(ST)CITY_ZIP
  2797.               call.
  2798.  
  2799.     In:  AH = 07AH
  2800.  
  2801.          BL = a case number, from 0 to BH-1, where BH is the
  2802.               number returned by the last call to ZK_STCITY_ZIP
  2803.               or ZK_CITY_ZIP.
  2804.  
  2805.    Out:  AL = The ZIPKEY state code for this entry.  Note that
  2806.               this is the same value for all entries returned by
  2807.               a given call to ZK_STCITY_ZIP or ZK_CITY_ZIP.
  2808.  
  2809.          DX = The zip region (0 to 999).
  2810.  
  2811.          CL = The bottom 2 digits (0 to 99) of the first zipcode
  2812.               in the range.
  2813.  
  2814.          CH = the bottom 2 digits (0 to 99) of the last zipcode
  2815.               in the range. CH = CL if there is only one zipcode.
  2816.                                                               6-9
  2817.  
  2818. ZK_SAVE: fetches values necessary to save ZIPKEY's context.
  2819.  
  2820.     In:  AH = 07BH
  2821.  
  2822.    Out:  BL = maximum number of characters for a ZK_ZIP_CITY city
  2823.               name.
  2824.  
  2825.          BH = the ZIPKEY state code for the last city-name
  2826.               search.
  2827.  
  2828.          BH = 0FF if there is no previous ZK_STCITY_ZIP or
  2829.               ZK_CITY_ZIP call.
  2830.  
  2831.          CXDX = internal codes identifying the last city search
  2832.  
  2833.          This function is provided just in case somebody wishes
  2834.          to incorporate ZIPKEY into a multitasking system, in
  2835.          which more than one task might be using ZIPKEY.  The
  2836.          task-switching code must call ZK_SAVE, record BX,CX, and
  2837.          DX as part of the task state, and feed those values to
  2838.          ZK_RESTORE before restarting the task.
  2839.  
  2840.          ZK_SAVE can also be used to read the current setting for
  2841.          the maximum city width, returned in the BL register.
  2842.  
  2843.  
  2844. ZK_RESTORE:   restores ZIPKEY's context from a previous ZK_SAVE
  2845.               call.
  2846.  
  2847.     In:  AH = 07CH
  2848.  
  2849.          BL = the maximum number of characters for a city name.
  2850.  
  2851.          BH = the ZIPKEY state code returned by a previous
  2852.               ZK_SAVE call.
  2853.  
  2854.          BH = 0FF if you are just setting the city width.
  2855.  
  2856.          CXDX = internal codes returned by a previous ZK_SAVE
  2857.                 call.
  2858.  
  2859.    Out:  Carry if BH,CX,DX are not codes which could have been
  2860.          returned by a previous ZK_SAVE call
  2861.  
  2862.          This function will be used most often to set the maximum
  2863.          city width.  It is also used in multitasking systems, as
  2864.          described under the previous function ZK_SAVE.
  2865.                                                              6-10
  2866.  
  2867. ZK_POPUP:   pops up a ZIPKEY window from a program.
  2868.  
  2869.     In:  AH = 07DH
  2870.  
  2871.          BL = an index number if you wish to simulate the
  2872.               pressing of a hotkey.
  2873.  
  2874.          BL = 0FF for immediate popup with nothing played back
  2875.               after a confirming Enter key.
  2876.  
  2877.    Out:  ZIPKEY takes action as if the hotkey indexed by BL has
  2878.          been pressed.  This typically includes popping up a
  2879.          window, waiting for the user to type a zipcode
  2880.          specification, and playing back an indicated sequence
  2881.          through the BIOS keystrokes buffer.  The values of BL
  2882.          are defined by the listing of hotkeys available from the
  2883.          configuration editing menu: BL=0 for the first hotkey,
  2884.          BL=1 for the second, etc.  If BL is not a valid index
  2885.          ZIPKEY pops up a window, then plays back nothing if a
  2886.          confirming Enter is given (ZIPKEY will play back
  2887.          alternate exit keys, however).  ZIPKEY does not return
  2888.          from this interrupt call until the window is popped
  2889.          away-- then it returns NoCarry.
  2890.  
  2891.  
  2892. ZK_REGION_CITY:   outputs the name of the primary city for a
  2893.                   zipcode region.
  2894.  
  2895.     In:  AH = 07EH
  2896.  
  2897.          DX = The zip region, ranging from 0 to 999.
  2898.  
  2899.          ES:DI points to the buffer to contain the returned city
  2900.          name.
  2901.  
  2902.    Out:  AL = The ZIPKEY state code for the region if the region
  2903.          exists.  The name of primary city for this region is
  2904.          output to ES:DI-pointed memory.  DI is advanced beyond
  2905.          the output.  AL = 0FF with the Carry flag set if the
  2906.          region does not exist.
  2907.                                                              6-11
  2908.  
  2909. ZK_SWITCH:   enables/disables hotkeys.
  2910.  
  2911.     In:  AH = 07FH
  2912.  
  2913.          BL = a control code:
  2914.                0 for turn off hotkeys
  2915.                1 for turn on hotkeys
  2916.                2 for no change, just return hotkey status
  2917.                3 for toggle hotkey status
  2918.  
  2919.    Out:  The activation of hotkeys is disabled/enabled/reported.
  2920.          When a hotkey is disabled ZIPKEY ignores it, and it
  2921.          reverts to its non-ZIPKEY functionality.  AL is returned
  2922.          set to the hotkeys status: 0 for off (disabled), 1 for
  2923.          on (enabled).
  2924.  
  2925.  
  2926.  
  2927. Sample Program Code
  2928.  
  2929. Following are fragments of assembly-language code that call
  2930. ZIPKEY's programmatic interface.  I've tried to make them
  2931. compatible with all the major assemblers, although they are
  2932. tested only against my A86 assembler. If you do use my A86
  2933. assembler, and you reuse the local labels L3, L4, and L6
  2934. elsewhere in your program, you should insert ">" into their
  2935. forward references in the following code: JC >L3; JC >L4; JMP
  2936. >L6.
  2937.  
  2938. RO_NAME:
  2939.   DB 'RO',0
  2940. NOME_NAME:
  2941.   DB 'nome',0DH
  2942.  
  2943.  
  2944. ; output a list of states to memory at 08000H
  2945.  
  2946. L0:
  2947.   MOV AH,070H       ; ZIPKEY function number ZK_VERSION
  2948.   INT 179           ; fetch the version information
  2949.   MOV CH,0          ; extend states count CL to CX
  2950.   MOV BL,0          ; load the first state code
  2951.   MOV DI,08000H     ; load the output pointer
  2952. L1:                 ; loop here to output each state name
  2953.   MOV AH,072H       ; ZIPKEY function number ZK_ST_ABBR
  2954.   INT 179           ; fetch the state abbreviation
  2955.   STOSW             ; output the abbreviation
  2956.   MOV AL,' '        ; load blank
  2957.   STOSB             ; output an intervening blank
  2958.   MOV AH,073H       ; ZIPKEY function number ZK_ST_NAME
  2959.   INT 179           ; output the full state name
  2960.   MOV AX,0A0DH      ; load CRLF
  2961.   STOSW             ; output CRLF to end this line
  2962.   INC BL            ; increment BL to the next state code
  2963.   LOOP L1           ; loop to output the next state
  2964.                                                              6-12
  2965.  
  2966. ; output to memory the list of valid zipcodes for region 474
  2967.  
  2968.   MOV DX,474        ; load the region number
  2969.   MOV DI,08000H     ; load the output pointer
  2970.   MOV CH,0          ; the first zipcode has bottom digits 00
  2971. L2:                 ; loop here to output each entry
  2972.   MOV AH,075H       ; ZIPKEY function number ZK_ZIP_ST
  2973.   INT 179           ; check the validity of this zipcode
  2974.   JC L3             ; skip if this is not a valid zipcode
  2975.   MOV BL,AL         ; zipcode valid: copy state code to BL
  2976.   MOV AH,074H       ; ZIPKEY function number ZK_ZIP_DIGITS
  2977.   INT 179           ; output the zipcode digits
  2978.   MOV AL,' '        ; load blank
  2979.   STOSB             ; output an intervening blank
  2980.   CALL CITY_ST_CRLF ; output the city, state, and CRLF
  2981. L3:
  2982.   INC CH            ; increment the bottom 2 digits counter
  2983.   CMP CH,100        ; have we completed the region?
  2984.   JB L2             ; loop if not, to output the next line
  2985.  
  2986.  
  2987. ; output a list of Illinois cities starting with RO
  2988.  
  2989.   MOV DI,08000H     ; load the output pointer
  2990.   MOV BX,'LI'       ; characters IL are reversed on the 8086
  2991.   MOV AH,071H       ; ZIPKEY function number ZK_ABBR_ST
  2992.   INT 179           ; fetch the state code for this abbreviation
  2993.   MOV BL,AL         ; copy the state code to BL
  2994.   PUSH CS           ; push our code segment
  2995.   POP DS                 ; set DS to our code segment
  2996.   MOV SI,OFFSET RO_NAME  ; point to "RO" city specification
  2997.   MOV AH,078H            ; ZIPKEY function number ZK_STCITY_ZIP
  2998.   INT 179           ; get the list of entries for this city
  2999.   JC L4             ; skip if the list was empty
  3000.   CALL OUT_ENTRIES
  3001. L4:
  3002.  
  3003.  
  3004. ; output a list of Nomes in the United States
  3005.  
  3006.   MOV DI,08000H            ; load the output pointer
  3007.   PUSH CS                  ; push our code segment
  3008.   POP DS                   ; set DS to our code segment
  3009.   MOV SI,OFFSET NOME_NAME  ; point to "Nome" specification
  3010.   MOV BL,0                 ; first state code is zero
  3011.   JMP L6                   ; jump into loop
  3012.  
  3013. L5:                        ; loop here for each matching state
  3014.   PUSH AX                  ; save the state code
  3015.   CALL OUT_ENTRIES         ; output the entries for this state
  3016.   POP BX                   ; restore the state code to BL
  3017.   INC BX                   ; increment to the next state
  3018. L6:
  3019.   MOV AH,079H              ; ZIPKEY function number ZK_CITY_ZIP
  3020.   INT 179                  ; find a state with the desired city
  3021.   JNC L5                   ; loop if found, to make display
  3022.                                                              6-13
  3023.  
  3024. ; set the maximum city width to 17
  3025.  
  3026.   MOV BL,17         ; load the desired city width
  3027.   MOV BH,0FFH       ; code signals that we load width only
  3028.   MOV AH,07CH       ; ZIPKEY function number ZK_RESTORE
  3029.   INT 179           ; set the city width
  3030.  
  3031.  
  3032. ; save and restore ZIPKEY context
  3033.  
  3034.   MOV AH,07BH       ; ZIPKEY function number ZK_SAVE
  3035.   INT 179           ; fetch the ZIPKEY context
  3036.   PUSH BX           ; push the context onto our stack
  3037.   PUSH CX
  3038.   PUSH DX
  3039. ; ....
  3040.   POP DX            ; pop the saved context
  3041.   POP CX
  3042.   POP BX
  3043.   MOV AH,07CH       ; ZIPKEY function number ZK_RESTORE
  3044.   INT 179           ; restore the ZIPKEY context
  3045.  
  3046.  
  3047. ; popup a window as if the first hotkey were pressed
  3048.  
  3049.   MOV AH,07DH       ; ZIPKEY function number ZK_POPUP
  3050.   MOV BL,0          ; index for the first hotkey is zero
  3051.   INT 179           ; popup the ZIPKEY window
  3052.  
  3053.  
  3054. ; insert keystrokes for zipcode 47401, as if alternate
  3055. ;   exit key F1 had been pressed
  3056.  
  3057.   MOV DX,474        ; load the region number 474
  3058.   MOV CH,01         ; load the last two digits 01
  3059.   MOV BX,03B00      ; load the BIOS code for the F1 key
  3060.   MOV AH,077H       ; ZIPKEY function number ZK_ZIP_KEYS
  3061.   INT 179           ; insert keystrokes for 47401 entry
  3062.  
  3063.  
  3064. ; toggle the activation of ZIPKEY's hotkeys
  3065.  
  3066.   MOV BL,3          ; control code for "toggle"
  3067.   MOV AH,07FH       ; ZIPKEY function number ZK_SWITCH
  3068.   INT 179           ; toggle the activation of hotkeys
  3069.                                                              6-14
  3070.  
  3071. CITY_ST_CRLF:       ; subroutine for outputting a city line
  3072.   MOV AH,076H       ; ZIPKEY function number ZK_ZIP_CITY
  3073.   INT 179           ; output the city name
  3074.   MOV AL,' '        ; load blank
  3075.   STOSB             ; output an intervening blank
  3076.   MOV AH,072H       ; ZIPKEY function number ZK_ST_ABBR
  3077.   INT 179           ; fetch the state abbreviation
  3078.   STOSW             ; output the state abbreviation
  3079.   MOV AX,0A0D       ; load CRLF
  3080.   STOSW             ; output CRLF to end this line
  3081.   RET
  3082.  
  3083.  
  3084. OUT_ENTRIES:        ; subroutine for outputting a cities-range
  3085.   MOV BL,0          ; load the first entry number
  3086. L7:                 ; loop here to output each entry
  3087.   PUSH BX           ; save the entry number during output
  3088.   PUSH DI           ; save the starting output pointer
  3089.   ADD DI,5          ; advance beyond the zipcode we will output
  3090.   MOV AX,'  '       ; load blanks
  3091.   STOSW             ; blank out the trailing range slot
  3092.   STOSW             ; slot plus trailing blank are 4 characters
  3093.   POP DI            ; restore the pointer to the line start
  3094.   MOV AH,07AH       ; ZIPKEY function number ZK_CASE_ZIP
  3095.   INT 179           ; look up this entry
  3096.   MOV BL,AL         ; copy the state code to BL
  3097.   CMP CL,CH         ; is there only one zipcode?
  3098.   JE L8             ; skip if single zipcode: slot stays blank
  3099.   PUSH DI           ; it is a range: save output pointer
  3100.   ADD DI,3          ; advance the output pointer
  3101.   MOV AH,074H       ; ZIPKEY function number ZK_ZIP_DIGITS
  3102.   INT 179           ; output the end-value zipcode digits
  3103.   POP DI            ; restore starting output pointer
  3104.   ES MOV BYTE PTR [DI+5],'-' ; place the trailing hyphen
  3105.   MOV CH,CL         ; copy the start-value to CH
  3106. L8:
  3107.   MOV AH,074H       ; ZIPKEY function number ZK_ZIP_DIGITS
  3108.   INT 179           ; output the start-value zipcode digits
  3109.   ADD DI,4          ; advance beyond the end-value slot
  3110.   CALL CITY_ST_CRLF ; output the city, state, CRLF
  3111.   POP BX            ; restore the entry number BL
  3112.   INC BL            ; increment the entry number
  3113.   CMP BL,BH         ; have we exhausted the entries?
  3114.   JB L7             ; loop if not, to output the next entry
  3115.   RET
  3116.  
  3117. INDEX                                                  7-1
  3118. A-specifier for playback, 3-10
  3119. Aaron, AL, 2-8
  3120. abbreviating a city name, 3-11
  3121. abbreviation, 2-letter, playback, 3-10
  3122. abbreviation, state-code to, 6-4
  3123. abbreviation-to-state code, 6-4
  3124. abbreviations in database, 2-8
  3125. abbreviations, state, finding, 2-5
  3126. aborting a search (Esc), 2-1
  3127. about the author, 1-8
  3128. AboveBoard, 3-3
  3129. address, my, 1-8
  3130. AH function number, 6-2
  3131. aligning to a city name, 3-11
  3132. Alt key in hotkeys, 3-7
  3133. Alt-backquote hotkey example, 3-15
  3134. alternate exit keys, 3-12
  3135. alternate hotkeys, 3-12
  3136. alternate window, 3-5
  3137. amendments to total price, 5-3
  3138. answering the order-form questionnaire, 5-3
  3139. ARC files, 1-7
  3140. arrow keys during configuration, 3-5
  3141. arrow keys during state/city search, 2-7
  3142. arrow keys during zipcode search, 2-4
  3143. asterisk during fixed key entry, 3-10
  3144. asterisk, literal playback, 3-11
  3145. atlas sources, 1-5
  3146. ATTRIB command, use with networks, 4-7
  3147. author, contacting, 1-8
  3148. AUTOEXEC.BAT file, 4-4
  3149. automatic ZIPKEY installation, 4-4
  3150. availability, permanent, 4-4
  3151. B-specifier for playback, 3-11
  3152. back-quote hotkey, 3-7
  3153. backing up your data, 1-3
  3154. backquote hotkey example, 3-15
  3155. backspace and escaped hotkey code, 3-8
  3156. backspace generation on playback, 3-11
  3157. Barney, GA example, 4-2
  3158. BBS distribution, 1-7
  3159. big cities, zipcodes for, 2-6
  3160. biography, 1-8
  3161. blank-padding example , 3-15
  3162. blank-padding of city name, 3-11
  3163. Borland, 3-5
  3164. bugs, reporting, 1-9
  3165. bulletin boards, my, 1-9
  3166. busy error code, 6-2
  3167. buying a copy of ZIPKEY, 5-1
  3168. C-specifier for playback, 3-11
  3169. calling conventions, 6-2
  3170. calling ZIPKEY from programs, 6-1
  3171. cancelling a window (Esc), 2-1
  3172. capacity of cities display, 2-5
  3173. Carry flag return status, 6-2
  3174. case sensitivity, 2-5
  3175.                                                        7-2
  3176. CBIS network, problems with, 3-3
  3177. charges for ZIPKEY, 5-1
  3178. CHECK_FOR_ZIPKEY code example, 6-2
  3179. cities display capacity, 2-5
  3180. cities listing example, 6-12
  3181. cities, guessed, 2-3
  3182. cities, large, zipcodes for, 2-6
  3183. cities, listing, 2-3
  3184. city lookup function, 6-5
  3185. city name in playback, 3-11
  3186. city name, abbreviating, 3-11
  3187. city name, longest in database, 3-11
  3188. city only search, 2-6
  3189. city width, program set, 6-9
  3190. city-line subroutine, 6-14
  3191. city-list subroutine, 6-14
  3192. city-only failed find, 2-7
  3193. city-only lookup function, 6-7
  3194. city/state/zip format, 3-10
  3195. club, beat over the head with, 5-1
  3196. color of window, 3-6
  3197. color vs. monochrome video modes, 3-6
  3198. COM vs. EXE file, 1-6
  3199. compilation copyright, 1-6
  3200. completing a zipcode, 2-6
  3201. conditions for distribution, 1-4
  3202. Condor compatibility, 3-5
  3203. configuration editing menu, 3-13
  3204. configuration, creating, 3-2
  3205. configuration, large, 4-3
  3206. configurations, re-installing, 4-3
  3207. configuring ZIPKEY, 3-1
  3208. contacting me, 1-8
  3209. contents, 0-2
  3210. context saving, 6-9
  3211. context setting example, 6-13
  3212. copyright of database, 1-5
  3213. correcting hotkeys, 4-3
  3214. correcting keyboard slowdown, 4-3
  3215. correcting your configuration, 4-2
  3216. Ctrl key in hotkeys, 3-7
  3217. current drive and directory, 4-5
  3218. cursor during next-state search, 2-7
  3219. customizing ZIPKEY, 3-1
  3220. data source, changing, 4-3
  3221. data, possible sources of, 3-3
  3222. database example, playback, 3-12
  3223. database manager example, 3-1
  3224. database, sources and copyright, 1-5
  3225. date, detecting OVL, 6-3
  3226. Dear example, 3-11
  3227. default options during configuration, 3-2
  3228. demonstration mode, 2-1
  3229. detecting ZIPKEY's version, 6-2
  3230. determining needs, 3-1
  3231. differences, evaluation vs. registered, 1-6
  3232. digits output function, 6-5
  3233.                                                        7-3
  3234. directories, sources, 1-5
  3235. disabling other resident programs, 4-4
  3236. disk storage of zipcodes, 3-3
  3237. diskettes, charge for, 5-2
  3238. disks, 3.5" vs. 5.25", 5-3
  3239. disks, number ordered, 5-3
  3240. display of hotkey name, wrong, 3-8
  3241. display of intermediate results, 3-4
  3242. distribution conditions, 1-4
  3243. distribution houses, shareware, 0-2
  3244. distribution naming conventions, 1-7
  3245. down-arrow during city search, 2-7
  3246. down-arrow during zipcode search, 2-4
  3247. East, unabbreviation, 2-8
  3248. editing menu, configuration, 3-13
  3249. electronic mail, 1-9
  3250. EMS memory, 3-3
  3251. Enter key during configuration choices, 3-2
  3252. Enter key during fixed key entry, 3-10
  3253. Enter key during playback specification, 3-12
  3254. Enter key in demonstration mode, 2-1
  3255. entries-lookup function, 6-8
  3256. error codes, program, 6-2
  3257. escaping from a window, 2-1
  3258. evaluation copy of ZIPKEY, 1-3
  3259. evaluation period, length of, 1-4
  3260. evaluation vs. registered differences, 1-6
  3261. examples, programming, 6-11
  3262. EXE vs. COM file, 1-6
  3263. existing zipcode, looking up, 3-9
  3264. exit keys, alternate, 3-12
  3265. exit keys, programmatic invoke, 6-6
  3266. expiration of evaluation, 5-1
  3267. expiration of subscription, 5-1
  3268. exploration keys, 2-4
  3269. F-specifier example , 3-15
  3270. F-specifier following city width, 3-11
  3271. F11 and F12 as hotkeys, 3-7
  3272. failed-find program error code, 6-3
  3273. fees for using ZIPKEY, 5-1
  3274. Fife, VA example, 4-2
  3275. files, how ZIPKEY finds, 4-5
  3276. finding a city only, 2-6
  3277. finding state abbreviations, 2-5
  3278. finding state/city, 2-5
  3279. finding zipcodes, 2-2
  3280. finding ZIPKEY files on your disk, 4-5
  3281. fixed field example, 3-15
  3282. fixed zipcode, 3-9
  3283. fixed-keystroke source for hotkey, 3-9
  3284. formatting city/state/zip playback, 3-10
  3285. Fort, unabbreviation, 2-8
  3286. frequency of disk updates, 5-3
  3287. full name of state, playback, 3-12
  3288. full name-to-state code, 6-4
  3289. function keys during configuration, 3-6
  3290. function keys, exiting ZIPKEY with, 3-13
  3291.                                                        7-4
  3292. functions, programming, 6-3
  3293. gathering order information, 5-2
  3294. generating an order form, 5-1
  3295. global settings, definition, 3-6
  3296. guessed cities, 2-3
  3297. Home key, 2-1
  3298. hotkey configuration, 3-6
  3299. hotkey echoing, wrong display, 3-8
  3300. hotkey enable/disable example, 6-13
  3301. hotkey name, 3-7
  3302. hotkey, definition, 1-2
  3303. hotkeys, disable/enable, 6-11
  3304. hotkeys, more than one, 3-12
  3305. how to contact me, 1-8
  3306. how to create a ZC file, 3-2
  3307. how to order, 5-1
  3308. illegal function number error code, 6-3
  3309. indented addresses, 3-11
  3310. InDOS flag, 3-3
  3311. installation, testing for, 6-1
  3312. installing files on a network, 4-7
  3313. Intel, 1-8
  3314. Intel, 3-3
  3315. interfacing your programs to ZIPKEY, 6-1
  3316. interference of other programs, 4-4
  3317. interference via interrupts, 6-1
  3318. intermediate results for zipcode, 2-2
  3319. intermediate results, city-only, 2-6
  3320. intermediate results, suppressing, 3-4
  3321. interrupt number, changing, 6-1
  3322. interrupt, ZIPKEY, 6-1
  3323. invoice, generating, 5-1
  3324. Jeffersonville example, 2-3
  3325. key playback from a program, 6-6
  3326. keyboard interference, 4-4
  3327. keyboard slowdown, 3-5
  3328. keyboards, licensing, 5-2
  3329. keystroke playback sequence, 3-10
  3330. keystrokes, determining, 3-1
  3331. King and Queen Court House, VA, 3-11
  3332. L-specifier for playback, 3-11
  3333. LAN compatibility, 3-3
  3334. large cities, zipcodes for, 2-6
  3335. large configuration, changing to, 4-3
  3336. Left vs. Right keys, 3-7
  3337. legal conditions for distribution, 1-4
  3338. legal terms, 1-3
  3339. length of city name, specifying, 3-11
  3340. length of subscription, 5-3
  3341. letters, fixed playback, 3-11
  3342. liabilities, 1-3
  3343. license length, 1-4
  3344. license, how to obtain, 5-1
  3345. LIM-EMS memory, 3-3
  3346. listing cities example, 6-12
  3347. listing cities, 2-3
  3348. listing regions, 2-2
  3349.                                                        7-5
  3350. listing states example, 6-11
  3351. listing zipcodes example, 6-12
  3352. literalizing during playback, 3-11
  3353. local zipcode option, 3-9
  3354. location of window, 3-5
  3355. longest city name in database, 3-11
  3356. looking up a city only, 2-6
  3357. looking up a zipcode, 2-1
  3358. looking up state abbreviations, 2-5
  3359. looking up state/city, 2-5
  3360. looking up zipcodes, 2-2
  3361. Lotus-Intel-Microsoft memory, 3-3
  3362. Louisville example, 2-3
  3363. lower vs. upper sensitivity, 2-5
  3364. mail, electronic, 1-9
  3365. main city of a region, 2-3
  3366. main memory for zip data, 3-4
  3367. main menu option 2, 2-1
  3368. main menu option 3, 3-2
  3369. main menu option 4, 4-1
  3370. main menu option 5, 5-1
  3371. making ZIPKEY permanently available, 4-4
  3372. manual, overview, 1-1
  3373. manuals, charge for, 5-2
  3374. materials fee, 5-2
  3375. maximum city name size, 3-11
  3376. memory model, 3-3
  3377. memory model, changing, 4-3
  3378. memory requirements, 1-2
  3379. memory-resident mode, definition, 1-2
  3380. memory-resident mode, running, 4-1
  3381. memory-resident programs, other, 4-4
  3382. memory-resident use, configuring, 3-2
  3383. Microsoft, 3-3
  3384. might-be cities, 2-3
  3385. missing characters, correcting, 3-5
  3386. missing playback keys, 4-2
  3387. modifications, see if you made, 3-14
  3388. modifying configuration files, 3-14
  3389. money, how to send, 5-1
  3390. monochrome vs. color video modes, 3-6
  3391. more hotkey examples, 3-15
  3392. Mount, unabbreviation, 2-8
  3393. moving from state to state, 2-7
  3394. multiple configuration files, 3-14
  3395. multiple hotkeys, 3-12
  3396. multiple-zipcode cities, 2-6
  3397. multitasking programming, 6-9
  3398. N-specifier following city width, 3-11
  3399. name of hotkey, wrong display, 3-8
  3400. named configuration files, 3-14
  3401. naming conventions for distribution, 1-7
  3402. National Park abbreviation, 2-8
  3403. network compatibility, 3-3
  3404. Network-OS, problems with, 3-3
  3405. networks, optimizing for, 4-7
  3406. Nome example, 2-7
  3407.                                                        7-6
  3408. Nomes list example, 6-12
  3409. North, unabbreviation, 2-8
  3410. num 5 hotkey, 3-4
  3411. number of states, 6-3
  3412. numlock on option, 3-4
  3413. operating requirements, 1-2
  3414. order form invitation, 1-6
  3415. order form, generating, 5-1
  3416. other memory-resident programs, 4-4
  3417. overseas postage, 5-3
  3418. overview of manual, 1-1
  3419. overview of ZIPKEY, 1-1
  3420. OVL date, detecting, 6-3
  3421. OVL file, how ZIPKEY finds, 4-6
  3422. OVL too new, 1-6
  3423. padding example, 3-15
  3424. padding of a city name, 3-11
  3425. paging keys, cities search, 2-5
  3426. paging keys, zipcode search, 2-4
  3427. PAK files, 1-7
  3428. PATH command, 4-5
  3429. PATH directory, putting ZIPKEY in, 4-6
  3430. payment for ZIPKEY, 5-1
  3431. permanent installation, 4-4
  3432. PgDn/PgUp in cities search, 2-5
  3433. PgDn/PgUp keys, zipcode search, 2-4
  3434. phone numbers of bulletin boards, 1-9
  3435. playback keys, missing, 4-2
  3436. playback of keystrokes, specifying, 3-10
  3437. playback unrelated to zipcodes, 3-15
  3438. playback, programmatic invoke, 6-6
  3439. pop up window from program, 6-10
  3440. pop-up window option for hotkey, 3-8
  3441. postage, adding overseas, 5-3
  3442. presence, testing for ZIPKEY's, 6-1
  3443. price notification policy, 1-4
  3444. price, amendments to, 5-3
  3445. prices, schedule of, 5-1
  3446. primary region-city lookup, 6-10
  3447. printed manuals, charge for, 5-2
  3448. printout of configuration (ZQR), 3-14
  3449. program code, sample, 6-11
  3450. program error codes, 6-2
  3451. program key insert example, 6-13
  3452. program popup example, 6-13
  3453. program width example, 6-13
  3454. programmatic interface, 6-1
  3455. programmed popup function, 6-10
  3456. prohibitions, specific, 1-4
  3457. ProKey, 3-5
  3458. publishing database, don't, 1-6
  3459. purchase orders, qualifying for, 5-2
  3460. question mark, 2-6
  3461. questionnaire, order-form, 5-3
  3462. quick-reference document, 3-14
  3463. quitting a search (Esc), 2-1
  3464. quotes mark at signon window, 2-8
  3465.                                                        7-7
  3466. R-specifier for playback, 3-11
  3467. ranges of zipcodes, 2-6
  3468. re-installing ZIPKEY, 4-3
  3469. read-only attribute, setting, 4-7
  3470. reference guide, definition, 1-1
  3471. references for database, 1-5
  3472. region city, primary lookup, 6-10
  3473. regions, definition of, 2-3
  3474. regions, listing, 2-2
  3475. register-saving conventions, 6-3
  3476. registered copy of ZIPKEY, 1-3
  3477. registering, how to, 5-1
  3478. release date, 0-1
  3479. repeat last zipcode, 2-8
  3480. repeat zipcode, example, 3-15
  3481. repeat-zipcode hotkeys, 3-9
  3482. requirements for operation, 1-2
  3483. resident programs, disabling other, 4-4
  3484. resident programs, other, 4-4
  3485. resident vs. non-resident, changing, 5-3
  3486. restarting computer, when needed, 4-3
  3487. restore context example, 6-13
  3488. restoring context, 6-9
  3489. retreat to start of city name, 3-11
  3490. Right vs. Left keys, 3-7
  3491. Robinson, IL example, 2-5
  3492. running memory-resident ZIPKEY, 4-1
  3493. S-specifier for playback, 3-12
  3494. Saint(e), unabbreviation, 2-8
  3495. sales tax, adding, 5-3
  3496. sample program code, 6-11
  3497. samples for keystrokes, 3-1
  3498. save/restore context example, 6-13
  3499. schedule of prices, 5-1
  3500. screen distractions, 3-4
  3501. screen, zipcode from, 3-9
  3502. search: city to state/zip, 2-6
  3503. search: state/city to zip, 2-5
  3504. search: zip to city, 2-2
  3505. send money, how to, 5-1
  3506. SET PATH command, 4-5
  3507. shareware, nature of, 0-2
  3508. Shift keys in hotkeys, 3-7
  3509. shredded wheat example, 2-7
  3510. Sidekick, 3-7
  3511. signature, ZIPKEY's, 6-1
  3512. signon window, 2-1
  3513. signon window, quotes mark, 2-8
  3514. signon window, returning to, 2-1
  3515. six-months prohibition, 1-6
  3516. Sizzleware, 1-5
  3517. slow down keyboard, 3-5
  3518. SmartKey, 3-5
  3519. sources of database, 1-5
  3520. sources of ZIPKEY's data, 3-3
  3521. South, unabbreviation, 2-8
  3522. speed of zipcode lookup, 3-4
  3523.                                                        7-8
  3524. state abbreviations, finding, 2-5
  3525. state code, abbreviation-to-, 6-4
  3526. state code-to-abbreviation, 6-4
  3527. state code-to-full name, 6-4
  3528. state lookup function, 6-5
  3529. state name playback, 3-12
  3530. state-and-city search, 2-5
  3531. states listing example, 6-11
  3532. states, getting total number, 6-3
  3533. subroutines, 6-14
  3534. subscribe, how to, 5-1
  3535. surcharge for purchase orders, 5-2
  3536. SysReq hotkey, 3-7
  3537. system requirements, 1-2
  3538. table of contents, 0-2
  3539. tax, adding, 5-3
  3540. telephone directories, 1-5
  3541. telephone numbers, bulletin board, 1-9
  3542. testing for ZIPKEY installation, 6-1
  3543. toggle hotkey-enable, 6-11
  3544. toggle hotkeys example, 6-13
  3545. too many cities display, 2-5
  3546. total price, amendments to, 5-3
  3547. trouble: computer freezes up, 4-4
  3548. trouble: interrupt interference, 6-1
  3549. trouble: many playback keys missed, 4-2
  3550. trouble: playback in wrong fields, 4-2
  3551. trouble: window doesn't pop up, 4-4
  3552. TSRs (memory resident programs), 4-4
  3553. Turbo Pascal, 3-5
  3554. tutorial, definition, 1-1
  3555. two-letter state abbreviation, playback, 3-10
  3556. U. S. Census, 1-5
  3557. unabbreviation, 2-8
  3558. undefined zipcodes within ranges, 2-6
  3559. unpacked database, licensing, 5-2
  3560. unpacking the database, 1-6
  3561. up-arrow during city search, 2-7
  3562. up-arrow during zipcode search, 2-4
  3563. updates, frequency of, 5-3
  3564. upper vs. lower sensitivity, 2-5
  3565. version function, 6-3
  3566. version number, "e" vs. "r", 1-6
  3567. version, detecting via program, 6-2
  3568. video modes: color vs. monochrome, 3-6
  3569. video screen, zipcode from, 3-9
  3570. West, unabbreviation, 2-8
  3571. Wettstein, Greg, 1-9
  3572. width of city name, specifying, 3-11
  3573. window characteristics, 3-5
  3574. window prompts, 2-2
  3575. Worcester, MA example, 2-6
  3576. word processor example, 3-2
  3577. Wordstar compatibility, 3-5
  3578. wrong display of hotkey name, 3-8
  3579. x's to complete a zipcode, 2-6
  3580. Z and C hotkey, 3-8
  3581.                                                        7-9
  3582. Z-specifier for playback, 3-12
  3583. ZC file, how to create, 3-2
  3584. ZC file, large, 4-3
  3585. ZC files, how ZIPKEY finds, 4-6
  3586. zero zipcode output, 2-8
  3587. ZIP files, 1-7
  3588. zip-to-city search, 2-2
  3589. zipcode from screen, 3-9
  3590. zipcode from screen, example, 3-15
  3591. zipcode listing example, 6-12
  3592. zipcode lookup function, 6-6
  3593. zipcode lookup, city-only, 6-7
  3594. zipcode playback, 3-12
  3595. zipcode source for a hotkey, 3-8
  3596. zipcode-to-city function, 6-5
  3597. zipcode-to-state function, 6-5
  3598. ZIPKEY 2 command, 2-1
  3599. ZIPKEY 3 command, 3-2
  3600. ZIPKEY 4 command, 4-1
  3601. ZIPKEY 5 command, 5-1
  3602. ZIPKEY and other resident programs, 4-4
  3603. ZIPKEY calling conventions, 6-2
  3604. ZIPKEY configuration, 3-1
  3605. ZIPKEY functions, 6-3
  3606. ZIPKEY in computer's memory, 3-3
  3607. ZIPKEY interrupt, 6-1
  3608. ZIPKEY.COM vs. ZIPKEY.EXE, 1-6
  3609. ZK_ABBR_ST function, 6-4
  3610. ZK_CASE_ZIP function, 6-8
  3611. ZK_CITY_ZIP function, 6-7
  3612. ZK_POPUP function, 6-10
  3613. ZK_REGION_CITY function, 6-10
  3614. ZK_RESTORE function, 6-9
  3615. ZK_SAVE function, 6-9
  3616. ZK_STCITY_ZIP function, 6-6
  3617. ZK_ST_ABBR function, 6-4
  3618. ZK_ST_NAME function, 6-4
  3619. ZK_SWITCH function, 6-11
  3620. ZK_VERSION function, 6-3
  3621. ZK_ZIP_CITY function, 6-5
  3622. ZK_ZIP_DIGITS function, 6-5
  3623. ZK_ZIP_KEYS function, 6-6
  3624. ZK_ZIP_ST function, 6-5
  3625. ZOO files, 1-7
  3626. ZQR file, 3-14
  3627. ZQR file, name of, 3-14
  3628.