**>> ZX2.DOC <<** ZX.COM is a horiZontal directory eXtended and integrated with other common file management utilities. File names are listed in alphabetical order. Here's the directory: A>zx D: > CHAR .DEF 1k > CHAR .GRK 1k > CHAR .GTH 1k > CHAR .ZIG 1k > FIND51 .COM 3k > FINDBD54.COM 2k > INITDISK.COM 5k > MERGPRIN.OVR 8k > NSWP .COM 12k > PRN .COM 29k > RESQ .COM 9k > SETDISK .COM 6k > TOON12 .COM 1k > UNERA .COM 1k > USFT1C .COM 6k > WS .COM 14k > WSJ .COM 14k > WSMSGS .OVR 26k > WSOVLY1 .OVR 27k > ZX .COM 2k D: 254k total/171k used >> 83k left A> In addition to the Directory, ZX also contains a file Erase function, a Scroll function for printing files with simultaneous text display, a Type function for viewing text in segments for reading, a sector-oriented text Editor, a Copy function for duplicating files, and a Rename function for changing file names. There is also a Help screen, which summarizes these functions. Where it might be useful, file operations are followed automatically by the directory to confirm the operation, or to assist in recovery from errors. ZX2.COM is smaller than 2k. ZX's small disk footprint is well-suited to any situation where space should be conserved, and its horizontal output fits small screens (such as short 80 column LCD's). However, ZX runs on any CP/M 2.x system which has a Z80 CPU. **>> NEW IN ZX2 <<** ZX and ZX1 are the predecessors of ZX2. The differences in ZX1 and ZX2 are: 1. ZX2 autologs the disks present when it is invoked. This slows execution somewhat, but insures that file operations cannot be thwarted by a BDOS error resulting from a disk change without a warm boot. It remains a mystery that CP/M detects such oversights, but was not designed to correct them. If you would prefer faster operation without auto-logging of disks, patch bytes 115, 116, and 117 of ZX2 from CD C0 03 to 00 00 00. 2. ZX2 has a much smoother Type function, which types right up to the end of a file, and suppresses set eighth bits on characters. The result is that WordStar files, as well as ASCII text files, are comprehensible onscreen. 3. ZX2 will Scroll a file for printing, without requiring multitudinous key presses to advance the text, as in the Type function. 4. ZX2 auto-names the second file in a Copy operation, avoiding retyping when the names are the same. 5. ZX2 has improved protection against trying to copy a file into itself. 6. ZX2 has a text mini-editor. For these reasons, I think that ZX (1k) will still be useful if only Directory, Type, Erase, and Rename is wanted, but those who use ZX1 (2k) will probably prefer ZX2 (still 2k). **>> USING ZX <<** COPY requires two file names, followed by C or c (see auto-name, below): A>ZX B:fl.one D:fl.two C -> will copy without a hitch, finish with a directory of D:, then return to A: for commands. However, it is sometimes necessary to know that ZX2 takes the disk of the first file as its temporary "default disk" during a copy operation. The result is that: A>ZX B:fl.one fl.two c -> will make B:fl.two, not A:fl.two. If you do not want to think about this (and who does?), just specify the disks to use and ZX2 will follow your instructions: A>ZX B:fl.one A:fl.two c -> will copy to A:fl.two, then give a directory of A:. Because most copies use the same file name for the new file, but put it on another disk, ZX2 has an auto-naming feature which saves the keystrokes required to type the second file name: A>ZX fl.one B: C -> makes B:fl.one, using the name supplied for the first file. DIRECTORY functions are performed in standard CP/M style: A>ZX -> directory of A: A>ZX D: -> directory of D: A>ZX a.fl -> show A.FL only A>ZX *.COM -> all .COM files on A: A>ZX B:??.* -> B:files with 1 & 2 letter file names ERASE is indicated by putting e or E after the file name: A>ZX bad.txt e -> erases A:BAD.TXT, then shows directory A>ZX B:*.bak e -> erases all .BAK files on B:, confirms with B: directory HELP is a screen summarizing these commands: D>ZX ? -> list of ZX commands RENAME requires two file names on the command line, then r or R: A>ZX apt.txt bad.txt r -> renames APT.TXT to BAD.TXT, then shows the directory to confirm SCROLL is started by S following the file name: A>ZX print.fl s -> scrolls text with no breaks. NOT followed by directory. Useful for speed readers, or for ^Printing the file. TYPE is initiated by t or T after the file, and stopped by ^X: A>ZX which.txt T -> each keypress shows one sector of WHICH.TXT, ^X exits to a directory EDITing is done from within the TYPE function, by typing ^E after display of the sector which you want to alter: --------------- This section contains lines with 80 characters ------------- D>zx prune.let t -> ZX called to Type PRUNE.LET Dearest Prunella, please do me the honor of being my wife. I can't continue to live without your company. Ardently, Fahrqhar -> ZX types first sector, stops -> Any key continues, ^X quits =Edit below= -> ^E edits, retypes text Dearest Prunella, please do me the honor of being my wife.[]I can't continue to live without your company.[]Ardently,[]Fahrqhar -> Redisplay for edit Friend Pru: =================favor====feeding my dog. []C================= feed him during vacation. ==Regards, ========== -> Edited text typed in, cr -> ZX displays edited sector Friend Pru: please do me the favor of feeding my dog. Can't continue to feed him during vacation. -> Any key continues display Regards, -> Re-edit with ^E Fahrqhar -> Exit to directory with ^X -> Automatic dir at end of text > PRUNE .LET 1k > PRUNE1 .LET 1k > PRUNE2 .LET 1k > PRUNE3 .LET 1k D: 254k total/ 6k used >>248k left -------------------------- Example EDIT session ---------------------------- Please examine the edit in the illustration above, which uses a document only one sector (128 characters) long for simplicity. ZX is called from CP/M to TYPE prune.let. It displays the first sector, then stops. At this point ^X (Control-X) will exit directly to the directory display. A ^E will invoke the edit function in order to change the characters just displayed. Fahrqhar typed ^E. The sector is then redisplayed for editing in linear form, without carriage returns(cr) or line feeds(lf). Instead, cr's are written as '[' and lf's as ']'. The stretched out, left-justified editing display is convenient because new text is typed immediately below the characters being replaced. There are three special editing characters: '=' leaves the character above it unchanged '[' puts a carriage return in the edited text ']' puts a line feed in the edited text. The '=' enables you to edit only sections which need changing. The '[' and ']' enable you to put new line breaks in the text, if required. Check the example above. If the special characters chosen are inconvenient for what you wish to do, patch a replacement for '=' into byte 535h patch a replacement for '[' into bytes 4FAh and 539h patch a replacement for ']' into bytes 4F6h and 53Dh. A carriage return (or typing off the end of the sector) terminates editing, and redisplays the newly-edited sector with normal line breaks. If the retyped section doesn't look right, another ^E will repeat the edit. If the edit seems OK, any other key continues with more text, or ^X exits to the directory. The same editing functions used when typing CP/M commands are also available while editing in ZX. When you reach the end of the first line just keep typing and let the monitor wrap the display around under the 48 characters in the second line (80 first line + 48 second line). When you type "return" to quit editing, characters beyond the quitting point are left unchanged. Like many other things in computing, text editing with ZX is easier done than said. While no one is likely to edit his novel using ZX, the mini-editor is well-suited to changing a date, altering a phrase, or adding a note to an existing document. **>> MESSAGES <<** =No file= indicates that a filename supplied in a rename, erase, copy, scroll, or type operation does not exist. The same message appears when a directory is requested for an empty disk. A =No file= is always followed by a directory display in order to assist the user in typing the correct file name. =File exists= indicates that you have tried to rename a file to a file name which already exists. The message is (of course) followed by a directory. =*/? in filename= is the most mysterious of the error messages, but means that an ambiguous file name (containing * or ?) has been supplied where an unambiguous file name must be. For example, ambiguous file names should not be supplied for renaming, because the directory will be scrambled. ZX will trap such attempts, without restricting the uses of amgiguity in directory and erase operations. To assist in finding the specific file name, =*/? in filename= is followed by a full directory (surprise!). =File exists: overwrite? y/n= You are paged before an existing file is replaced during a copy operation. =File names identical= You are trying to copy a file into itself. If carried out, this command trashes the directory entry, so ZX2 notes it, backs out, then shows the directory to assist whatever you were trying to do. ZX2 detects subtle examples of this difficulty like: A>ZX D:fl.one fl.one (recall that the default disk is D: during copying) and will give this message. =Command unclear: ZX ? for help= The command character at the end of the input line is not on ZX2's list. =Copying= The command line has cleared all tests. =Directory full=, =Disk full=. =File close failed= It takes great agility to see this message, which means that the new file ZX2 made to copy TO has somehow disappeared before ZX2 could finish writing it. =Edit below= Edit mode has been invoked. Align the new text below the original text. **>> ZX2'S OTHER USES <<** Original ZX will appeal to the minimalist, who wants the smallest size and will supply other file functions with other programs. ZX2's uses, considered more generally, are to serve as the sole file utility in any situation where disk space should be conserved. As the notes say, it is a "light power tool" whose small disk footprint is better suited to portable computers, or to file or archive disks, than are larger (and more versatile) programs like NSWEEP. However, I hope that you find ZX2's command-driven, directory-oriented style engaging in its own right. It provides an efficient way to perform single-file operations, and orders all operations from a consistent and simple command format. Besides, there is something likeable about its relentless attempts to help. September, 1985 Mike Yarus 2231 16th Street Boulder, CO 80302 Compuserve 73145,513