************************************************************************ * * * PATCH 1.8 DOCUMENTATION * * * ************************************************************************ PATCH.COM is copyrighted by Bill Rink, San Jose, Ca. TURBO PASCAL is copyrighted by Borland International, Scotts Valley, Ca. Note: This was compiled with a Z80 version TURBO PASCAL compiler. ** TERMINAL INSTALLATION PROGRAM NOW INCLUDED ** (SEE BELOW FOR INSTALLATION INSTRUCTIONS) ------------------------------------------------------------------------ Record of Revisions ------------------------------------------------------------------------ Release date May 5, 1985 PATCH 1.8 1. Fixed a bug in the directory procedure. Also, scans all users files in sequence. 2. Added a CP/M status routine to display various parameters about your system. 3. Changed DISPLAY of ASCII files routine so that it is not necessary to have a DELINE function in your terminal, also updates screen more quickly. Release date January 20, 1985 PATCH 1.7 (not released due to DIR bug) 1. Put the cursor key variable in 1st page of program space so that it can be modified for terminal installation. (See install procedure.) Release date December 27, 1984 PATCH 1.6 1. Fixed bug that limited maximum user number to 9. 2. You can now search while viewing ASCII files in the alternate DISPLAY mode. 3. When changing DISPLAY modes, the file pointer is decremented so that you will reference the same records after the change in mode. 4. Slight modifications to DOC file to clarify the install procedures. 12/20/84 Robert Flagg 72466,2332 (for KayPro SIG, Compuserve PCS25) KayPro Sig Version includes Kim Levitt's terminal definition file (renamed PAT15.DTA) from his LIFE.LBR 11/25/84 courtesy Kim Levitt. Release date December 1, 1984 PATCH 1.5 1. Added the capability to read and write system tracks. Actually any track/record on the disk can be modified. 2. Added an overlay feature to allow the overlaying of a file to any track/record on the disk. The routine performs a two record copy at a time and so it is quite slow, but effective. 3. Corrected some documentation errors in the DOC file. Not Released Patch 1.4 Release Date November 13, 1984 Patch 1.3 I received a phone call from Irv Hoff telling me that people were having difficulty running the .COM file, most likely because of TPA size differences. Well, as it turned out that was the problem. Evidently when TURBO PASCAL compiles a program, it records the top of the TPA in the file so that upon loading the .COM file into memory it sets the program variable space at the top of memory. Well, if your running ZCPR3 or have a large BIOS, then most likely PATCH was stepping all over your CCP and causing untold problems. This new version was compiled for a TPA size of 48k, top of TPA set to BF00. Thanks to Irv Hoff for pointing it out! Release Date October 31, 1984 Patch 1.2 1. Fixed search function to stop after wrapping around to beginning of search. 2. Added tabbing to ASCII display mode (tab size=8). 3. Quicker disk operations during searches. 4. Default disk changed when reference is made to a disk in File Name. 5. Added a WILDCARD to the search routine Release Date October 21, 1984 Patch 1.1 1. Changed Search function to disregard upper/lower case distinction by by using a toggle. 2. Search now begins at current record and wraps around. 3. Now able to select disks other than default. 4. Added Display mode that prints ASCII files out in line format for better readability. First Release Date October 15, 1984 Patch 1.0 ------------------------------------------------------------------------ PATCH 1.7 (c) Copyright Bill Rink; 1984 ------------------------------------------------------------------------ This software is made available to the public domain and may be freely distributed. It is not to be sold or used for commercial use under any circumstances, without the express consent of the author. I may be con- tacted by addressing your correspondence to: William Rink PO Box 21447 San Jose, Ca 95151-1447 ........................................................................ PATCH is a file/memory editor that allows for easy access of either in- dividual records within a file, pages within memory, or individual records on the disk. PATCH can operate in one of two modes; accessing 128 byte records from within the selected file, or 256 byte pages of processor memory (up to 64k). Regardless of which mode you are in, there are 256 bytes of information displayed on the screen. PATCH works like a full screen editor when changing hex data. In addition, it has search capabilities on any combination of either HEX, DECIMAL, or ASCII fields that are separated by commas. PATCH is based upon the concept of EDFILE, a program which I have used extensively and enjoyed tremendously. My desire was to make an enhanced version that would be easy to use and more versatile. **************** INSTALLATION ********************* To install this program, simply execute the PATCHINS.COM program and re- pond to the prompts. You MUST have the following files on the same drive/user area in order to successfully install the program: 1. PATCH.COM 2. PATCHINS.DTA 3. PATCHINS.MSG 4. PATCHINS.COM Please read the INSTALL.DOC file for detail information on how to prop- erly install PATCH.COM. Make certain that you have the proper information available for answer- ing the terminal control questions before proceeding with a MANUAL in- stallation. By the way, I have noticed that in some cases TURBO PASCAL actually uses the opposite control characters for REVERSE VIDEO. If your start-up screen does not have a REVERSE VIDEO boarder around the main menu, try reversing the definitions for START HIGHLIGHTING and END HIGH- LIGHTING. CURSOR KEY DEFINITION If you would like to customize the cursor movement commands to match those of your terminal, simply use PATCH to modify the following loca- tions. Modify PATCH.COM, not the memory image, as you will experience problems in trying to modify run-time code on the fly that is referen- cing these locations each time you enter a key during an edit session. Values in parenthesis are the current defaults. UP Cursor 0132 hex (10) Left Cursor (02) 0138 hex Down Cursor 0135 hex (0E) Right Cursor (06) 013B hex You will notice that there are lables to the left of each of these lo- cations to confirm the data byte being changed. Sorry, ONLY a single byte is available for defining the cursor keys as I only read a single character from the keyboard each time to determine if it is data or a cursor key. START-UP SCREEN When PATCH is first started it displays a menu of available options. You'll notice that at this time you can select which disk and user area is to be used for making changes. The disk can also be changed once you are working with disk files by indicating the disk with the file name. You can then choose from viewing/editing records from either a particu- lar file, disk tracks, or pages from within memory. Depending on which mode you enter, you will then have a selection of commands available to use. COMMANDS You will then be shown a list of commands to use for operating in that mode. The command set is more complete when editing files due to the nature of operation. 'Display' This will change the display mode for looking at a file. If you are looking at a file in the hex/ASCII mode, entering a "D" will toggle you into a ASCII line mode in which each line is strictly ASCII and is terminated by a CR,LF. Any non-printable characters will be shown as a reverse video field to indicate them as such. Tabs are converted, using a tab size of 8. Binary files that end in .COM are illegal to display and you will not be allowed to use this mode. 'Record' FILE MODE-Enter the record number within the file that you wish to access. This is a DECIMAL record number. The EOF record is shown next to the file name. TRACK MODE-You will be asked for the track number and the record number. Again these are DECIMAL numbers. The number of sectors per track are shown at the top of the screen. You will be prompted for either PHYSICAL or LOGICAL record numbers, depending on which mode you are in. 'Base' Allows changing the BASE address used as a reference while in a file. The default is 100H. This is useful when view- ing image files of the operating system. The BASE can be changed from anywhere within a file. The screen that you are currently viewing will then be updated. The BASE can be set when you are viewing system tracks to reflect the ac- tual memory locations that the operating system would reside in. If you are outside the system tracks, the address refer- ences lose their meaning. BASE is not allowed when viewing memory locations. 'Search' Will prompt you for a search key to be used for scanning re- cords or memory. You may search for any combination of char- acter types (hex, decimal, or ASCII). To denote different types, use a prefix before the field. Use quotes (") at the beginning of any ASCII field, a decimal point (.) at the be- ginning of a decimal field, and a H at the start of a hex field. If you leave the prefix out, it will be assumed to be hex. Separate each field with a comma. e.g. "This is ASCII,.1234,0FE1," etc. Will search for an ASCII string followed by a decimal, hex and ASCII field. When a string is found, it will be reverse highlighted to denote it from the rest. Wildcards are permitted by using an 'X' for a don't care. This must be a separate field, delimited by a comma and there may be as many X's in the string as you desire. For example, entering a "Bo,X,"t,X for a search string would locate a match for BOATING, BOOTS, or BOTTOM. Exercise caution, be- cause whenever the wildcard(s) are present, any "X" in an ASCII string will act as if it were a wild card too. For ex- ample, searching with a string of "XRAY,X will locate XRAYS as well as GRAYS. Searches are done on an entire 256 byte buffer and so there are times when the target string will cross the boundary be- tween two buffers. When this happens you will be notified and the tail end of the string will be highlighted. Just go back one record to access the beginning of the target string. (Sometimes more characters are highlighted than necessary when a boundary is crossed, do not be concerned..) You can terminate the search at any time by hitting any char- acter on the keyboard. This is useful if you are searching a long file and realize that you entered the wrong key. The re- sponse will always be KEY NOT FOUND and you will be returned to the record from which the search began. 'Ucase' When highlighted, it means that when searching for an ASCII match, the case of the key and the string matched against will NOT matter. Both the search string and the characters searched will be converted to UPPER case for determining a match. If not highlighted, case does matter. This feature can be toggled by entering an "U" command. If you perform a search on a hex, decimal, or ASCII and numerical combination, Ucase will toggle to the OFF state i.e., all searches will be exact matches if mixed or numeric. 'Cont' Continues the search for the last string found. 'Address' Allows a HEX address to be entered for positioning from within the file or memory. This option is not valid when in TRACK mode. 'Edit' Will place the cursor at the top left corner or at the begining of the string that was found with a 'Search'. Commands will be displayed to indicate how you may move the cursor from within the display. There are two sets of commands available, the standard WordStar format and one for those who like to use thier right hand. If you have cursor keypad that outputs E2,E4,E6, and E8, then it will work. (You can use PATCH to change these for your particular keypad, just search for them) To change from the HEX field to the ASCII field, or visa versa, enter a ^F. To quit editing, enter a ^Q. You will then be asked if you wish to WRITE the record or ABORT the edit. Hitting ANY character other than a "W" will abort the update. You will notice that the screen is then re- freshed with the current record. On an EDIT update PATCH will write the record and then read it back, displaying the changed data on the screen. If you ABORT, PATCH will read the unmodified records and redisplay them. 'Page' Paging is accomplished by either entering a + or -, or hit- ting a RETURN for paging forward. In TRACK mode, PATCH will take you from track to track as you exceed the number of records on a track. 'Overlay' This feature is available when you are in FILE mode only. By selecting it you are asked how many records you would like to copy from the file. Next you are asked if those records should be PHYSICAL or LOGICAL. If you are copying into sys- tem tracks you should use PHYSICAL, into another file use LOGICAL. Next you are asked for the destination track and record. Upon completion of this entry you will be told what it is about to do. If you like the parameters, just enter a 'Y'. Now PATCH will read two records and copy them to the destination, one at a time. It seems slow, but reliable and required little structural changes in the software. 'Log_Sec' The default mode for accessing TRACKS is in the PHYSICAL record mode i.e., each record accessed is physically located after the preceeding one. The system tracks are written this way to make booting the operating system simpler. Once the BIOS is in control, all disk accesses are done using LOGICAL records and so PATCH will use the disk skewing table in the BIOS to compute the PHYSICAL record needed to gain access to the desired LOGICAL record. This mode can be toggled. When in LOG_REC mode you will see both record numbers displayed at the top of the screen. To use this program, it is necessary that your terminal have the follow- ing following screen commands available: Cursor Addressing Reverse Video Clear Line Clear Screen I think you will find this a powerful PATCH utility and I hope you find it useful. Enjoy! Bill Rink San Jose, California