Z-Ray (ZIP File X-Ray) 1.24
Copyright 1990 by Gordon Haff and Bit Masons Consulting.
All rights reserved.
Purpose: Provides a scrollable environment for selecting
files contained within a ZIP file and viewing or
extracting their contents
Syntax: ZR [d:][\path\]filename.ZIP [/n]
Commands: views files
or extracts files
Prereqs: 100% IBM Compatible PC running DOS 2.1 or higher
Archive Name: ZRAY123.ZIP
In its default configuration, ZV REQUIRES Vern Buerg's
LIST file viewing program and Phil Katz's PKUNZIP
program. LIST and PKUNZIP are Shareware and require
separate registration with their authors.
While ZV can be operated from the DOS command line
using the format described above, it is most
conveniently called as a user-defined shell command
(or SmartViewer in DF 4.0 and later) from within the
author's Directory Freedom (DF) program.
Other: Your COMSPEC variable must be set. See Section 2.1.
This program was formerly called ZipView or ZV. It
has been renamed to eliminate confusion with other
similarly named products.
ZR 1.24 2
The author hereby disclaims all warranties relating to this
product, whether express or implied, including without limitation
any implied warranties of merchantability or fitness for a
particular purpose. The author cannot and will not be liable for
any special, incidental, consequential, indirect or similar
damages due to loss of data or any other reason, even if the
author or an authorized agent has been advised of the possibility
of such damages. In no event shall the liability for any damages
ever exceed the price paid for the license to use the software,
regardless of the form and/or extent of the claim. The user of
this program bears all risk as to the quality and performance of
ZR is distributed as free, copyrighted software. What this means
is that you can use this program for as long as you like without
cost or obligation. What you cannot do is to sell this software
or make a profit off of it (except as described below) without
the express written permission of the author.
ZR is the sole property of Gordon Haff. The program may be
freely copied and transferred to individual parties. It may be
posted on Bulletin Board systems (BBS) for electronic access as
long as NO FEE is charged for its distribution except for private
BBS operations that charge a regular user subscription fee.
Computer information services such as Compuserve (CIS), Genie,
and Byte Information Exchange (BIX) are authorized to post this
product for subscriber access. ZR may be distributed on diskette
only by 1) disk distributors/vendors who are associate members of
the Association of Shareware Professionals (ASP) or 2) users
groups which do not charge more than a nominal fee ($5) to cover
the costs of distribution. Any changes to these policies must be
made in writing by the author.
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the
member directly, ASP may be able to help. The ASP Ombudsman can
help you resolve a dispute or problem with an ASP member, but
does not provide technical support for members' products. Please
write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006
or send a Compuserve message via easyplex to ASP Ombudsman
ZR 1.24 3
Since this program is a freebie, unlike the shareware programs
for which I request a registration fee, I'm not going to make any
guarantees here with respect to bug fixes or other technical
support. Having said that, I do like my programs to be as
bug-free as possible, so feel free to report any problems which
you run across.
Channel 1 BBS (617) 354-8873
Compuserve User ID# 72561,2637 (See Note 1)
InterNet/ARPANET [email protected]
U.S. Mail 3205 Windsor Ridge Dr.
Westboro MA 01581
Telephone (508) 898-3321 (after 6pm
The above are roughly in order of preference (i.e. how quickly
I'm likely to see your message and be able to respond). I check
Channel One almost daily and the other electronic services at
least weekly in most cases. In addition, I monitor the Interlink
and the PCRelay Shareware relays through Channel One.
When contacting me via Compuserve, please use the Easyplex mail
system since I do not regularly monitor any of the IBM SIG
ZR 1.24 4
1.0 Why and Whence ZR?
The main reason that I wrote Z-Ray (as in Zip X-Ray) is the
following: I have a shareware file management program called
Directory Freedom which is small and fast in spite of having
more wonderful and exciting features than I could possibly
describe here (Plug #1). Yet, there was still one thing which I
continually ended up having to exit DF to do -- namely, to view
the contents of files contained within ZIP files.
This annoyed me.
I looked high and low for a program which I could call with DF's
nifty user-defined shell function (Plug #2), but nothing did
exactly what I needed. So out came the assembler and, a week or
so later, out popped ZR.
So.... armed with ZR, DF can now perform most of the major
archiving and de-archiving functions that people who deal
primarily with Phil Katz's ZIP format need. (The next major rev
of DF will have the capability to archive files.) For the fancy
stuff (such as selective de-archiving), you'll still need a
program like ARCMASTER or SHEZ, but DF will be able to handle all
the everyday stuff.
ZR 1.24 5
2.0 How does it Work?
I'm glad you asked that question. It works incredibly well.
Oh.. HOW does it work. Well, there's nothing to it.
The command line syntax is just:
ZR [d:][\path\]filename.ZIP [/n]
So, any of the following are valid:
ZR E:\FOOBAR.ZIP /n
You do need to type the extension since ZR will look into any
file (including self-extracting files).
/n (or -n) will sort the list in ascending alphabetical order.
Assuming the specified file exists and is valid, you'll get a
window on the screen which looks something like the following.
The top line will be highlighted.
Filename Before Method CR After Date Time CRC Attr
------------ -------- -------- --- ------- -------- ------ -------- ----
ASCAN.C 11591 Imploded 72% 3278 3-15-90 8:29p C48F03BC ---a
ASIZE.C 17195 Imploded 76% 4134 3-15-90 12:31a A68B0C17 ---a
BBSWEEP.C 6465 Imploded 69% 2031 1-22-90 1:06a 68E0379C ---a
CONVERT.C 37526 Imploded 77% 8446 3-14-90 10:21p 2B42D1B8 ---a
HEADER.C 11732 Imploded 72% 3342 3-03-90 10:03p E67A9698 ---a
IBMDOS.C 2765 Imploded 71% 812 2-17-90 5:39p 4575BF5C ---a
MACROS.C 301 Shrunk 31% 207 11-27-89 7:49p 9D902C85 ---a
MAKEFILE 1602 Imploded 74% 412 3-06-90 4:51p 9C92811F ---a
REDATE.C 17883 Imploded 79% 3710 1-22-90 1:07a 86A021A8 ---a
SELF.C 1654 Imploded 66% 567 1-21-90 10:21p 65F69EE4 ---a
TEST.C 10242 Imploded 69% 3142 3-15-90 8:29p B53434B5 ---a
UNARC.C 15631 Imploded 74% 4136 3-06-90 7:35p 50C371B8 ---a
UNIVERSE.C 7370 Imploded 69% 2256 3-14-90 9:21p 91B1CE5F ---a
VERSION.C 1551 Imploded 48% 804 2-16-90 11:27p B7B98077 ---a
VIEW.C 23958 Imploded 75% 6006 3-06-90 9:38p 5E983326 ---a
Z-Ray 1.24 Copyright 1990 by Gordon Haff and Bit Masons Consulting
ZR 1.24 6
You can move the highlight bar arround with the , Arrow>, , and , These do pretty much what you'd
expect them to do.
You can quit by hitting the key.
And now we come to the useful part -- you can view the contents
of a file by pressing the key.
What the key does is pipe the contents of the highlighted
file to Vernon Buerg's LIST program. PKUNZIP and LIST MUST BE
PRESENT IN YOUR PATH OR THIS WON'T WORK!!! Later on, I explain
how the default command line can be changed in case you've
renamed LIST or know some other way to do the same thing. The
default exec line is:
PKUNZIP -c ~ ` | list /s
~ is the name of the archive being viewed
` is the name of the selected file
These names are filled in dynamically by ZR.
But Wait! There's more! As of Revision 1.20, you can also
EXTRACT the highlighted file. Pressing or e will
extract the highlighted file with the following default command
PKUNZIP ~ `
As with the viewer, this function requires that PKUNZIP be
present in your path.
ZR 1.24 7
2,1 COMSPEC Variable.
In Order for ZR to work, your COMSPEC environment variable must
be set. This variable tells ZR the name and the location of the
command interpreter to use when it shells to PKUNZIP. Without a
COMSPEC variable, ZR will display a file listing, but you will be
unable to view the contents of files,
To set the COMSPEC variable, include a line such as:
in your AUTOEXEC.BAT file. The above example is typical for a
hard disk system but other COMSPEC lines such as:
SET COMSPEC=C:\4DOS.COM and
are also possible. The former uses J.P. Software's excellent
4DOS as the shell and the latter uses COMMAND.COM on the current
logical disk (This would be common for a floppy-only system).
You can view your environment settings at any time
by typing SET at the DOS prompt.
ZR 1.24 8
3.0 Customizing ZR.
I haven't gone and written a fancy user-friendly configuration
program for ZR, but you can do some limited modification if you
have a hex editor of some sort such as Norton's DiskEdit or NU.
Debug will also do in a pinch for the more adventurous.
MAKE ALL MODIFICATIONS ON A COPY! ALSO -- make sure that the
rev of the program matches this documentation since the offsets
could change between revisions!
Variable Offset Default
-------- ------ -------
C_NORMAL 0Dh 02h
C_INVERSE 0Eh 74h
C_INTENSE 0Fh 03h
C_BORDER 10h 4Eh
C_BORDER is the attribute for the window border, C_INTENSE for
the heading in the window, C_INVERSE for the bar. The color
values are in standard DOS combined foreground/background format.
See the Appendix for details on the values you can enter.
The default command line for the viewer is:
PKUNZIP -c ~ ` | list /s
and resides from offset 14h through 31h, padded with spaces
(20h). (These offsets, like those for the colors, are relative
to the beginning of the file at 0000h.) If you modify this
command line, be careful not to overflow the space allotted to it
(there's a NULL (00) on the end) or the results will likely be
The default command line for the Archive extract is:
PKUNZIP ~ `
and resides from offsets 36h through 53h.
ZR 1.24 9
4.0 Configuring DF to use ZR:
This is also very easy. Just configure one of the User-defined
command lines (using DFCONFIG) to read:
When you highlight a file with DF and press the defined function
key, you will pop directly into the file listing window of ZR
from which you can select files to view. No file names to type!
Isn't that easy? (It'll be even easier with the SmartViewers in
DF 4.0. You'll just setup ZR ~ to act on a ZIP extension. Then
just press to view the contents of a .ZIP file.)
5.0 Technical and Acknowledgments.
ZR was written using Borland's Turbo Assembler 2.0 and Turbo
Debugger 2.0, American Cybernetic's Multi-Edit 4.0, and Base Two
Development's Spontaneous Assembly assembler library.
DF was developed on a homebrew 386 (named Dejah Thoris) based on
an AMI 20MHz full-size motherboard with a Micropolis 160MB ESDI
disk and Ultrastore 12(F) ESDI controller. It is a dual monitor
system with an Orchid Prodesigner 512KB VGA board and an IBM MDA
board. The system runs DOS 3.3, QEMM, and Windows 3.0. While
it is not possible to test with all possible configurations,
test systems have included a DG/One 2T laptop, a Northgate 486,
a DG Dasher/286 with EGA, and an Intel 386/25 with VGA. Testing
included both DOS 3.3 and DOS 4.01.
Last, but certainly not least, thanks to my Directory Freedom
beta crew who have also helped out in debugging Z-Ray as well.
ZR 1.24 10
6.0 Other Programs from Gordon Haff and Bit Masons Consulting:
Directory Freedom (DF):
Offers users a fast, compact alternative to DOS Shells which
provides 1) selective file and directory operations; 2) a
scrollable environment for examining files and directories; 3)
user-defined keys which can operate upon highlighted files
(e.g. by defining an editor). All this in a program which
takes less than 20KB since it is written in assembler! Easily
customized through an external configuration program. A "look-
and-feel" similar to PC Mag's DR, but does much more. Now with
SmartViewers and many more exciting new features.
Shareware: $20 Registration
Latest version: 4.00 (DF400.ZIP)
the last word:
'the last word' is a quotations trivia game in which 1 to 4
players compete against each other and their own high scores in
identifying the source of quotations and completing partial
quotes. Most answers are entered free-form and are matched
against a set of acceptable responses with a sophisticated
pattern-recognition algorithm. 'the last word' runs in text
mode -- including on mono displays -- and offers a high level
of user configurability.
Shareware: $15 Registration
Latest version: 1.00 (LWORD100.ZIP)
Renames a file to the current date. In other words, if the
current date were 10-06-90, the file 'FILENAME.QWK' would be
renamed to 901006.QWK. The letters A through Z will be
appended as required to largely eliminate duplications.
This is a handy program for archiving message packets from
bulletin boards, for example.
Free, copyrighted software (with 'C' source)
Latest version: 1.0 (ND.ZIP or NEWDATE.ZIP)
These programs and others (Multi-Edit macros for use with Qmail
Deluxe, for example) are available on many fine bulletin boards.
The latest releases are always available on Channel One. If you
just have to get a copy of one or more of these programs and
can't find one, however, I can send them out for a nominal media
and postage charge.
ZR 1.24 11
Rev. 1.24 Additional memory management modifications
Rev. 1.23 Rewrote memory management so that larger (in
terms of number of ZIPped files) archives can be
handled (archives containing > 256 files at
least are OK)
/n command-line to optionally sort list is
ascending filename order
Name changed from ZV (ZipView) to ZR (Z-Ray)
Rev. 1.22 Corrected error message for when not enough
memory to store interpreted file names
Rev. 1.21 Fixed another big with and keys when
directory less than a screenful
Rev. 1.20 Fixed bug with key when cursor at bottom of
Added and keys
Added Extract Archive function
Rev. 1.11 Fixed problem when SHARE was installed (Thanks to
Dr. Herbert Markley for finding this -- the .ZIP
file wasn't closed when the EXEC occurred and
PKUNZIP, being the well written program that it
is, was rightly refusing to have anything to do
with the file as a consequence.)
Rev. 1.10 Fixed display problem on monochrome systems
Fixed problems with ZIP files < 10Kbytes
Rev. 1.0 Initial Release
8.0 Known Limitations:
(i.e. This is a free program and I got tired of beating out my
brains over it for the time being.)
o Truncates the display of files archived with their paths
and will not pipe them to the viewer properly if the
entire path and filename is greater than 13 characters.
o For various reasons, the central directory is only
looked for in the last 10KB of the file. *Conceivably*
this could cause problems if there were very large ZIP
ZR 1.24 12
The color number stored for use in ZR are combined
foreground/background attributes of the type used by DOS. This
combined attribute value is simply the foreground and background
numbers, as given below, bit-wise OR'd together. That's a fancy
way of saying added together for our purposes here. (Remember
though that these are hexadecimal numbers.) For example, yellow
on a blue background is given by 1Eh (0Eh + 10h).
Foreground (normal) Foreground (intense) Background
0 black 8 dark gray 0 black
1 blue 9 light blue 10h blue
2 green 0Ah light green 20h green
3 cyan 0Bh light cyan 30h cyan
4 red 0Ch light red 40h red
5 magenta 0Dh light mag. 50h magenta
6 brown 0Eh yellow 60h brown
7 gray 0Fh intense white 70h gray