============================================================================ BBBB 222 9999 B B 2 2 9 9 B B 2 9 9 BBBB 2 99999 B B 2 9 B B 2 9 BBBB 22222 9999 ============================================================================ B29.COM Version 3.04 Written by Gary Conway Infinity Design Concepts (c) 1985,86 MEMBER : KKUG - Kentuckiana Kaypro Users Group IEEE - Institute of Electrical and Electronics Engineers, INC. PCCL - Portable Computer Club of Louisville FORWARD This program is an Newsweep work-alike and I must pause here to give credit where credit is due. Anyone who has used Newsweep to any degree at all has surely realized all of the work and effort that has gone into the creation of this excellent program. Mr. Rand has certainly done a fine job in the development of Newsweep. The layout alone and in particular the idea of tagging files for mass operations is one of the finest features. The layout of B29 is very similar and I must offer a hearty thank-you to Dave Rand, whom I have never even spoken to and to the creator/s of SWEEP, the original. I have been a religous user of Newsweep for some time and being one who cannot leave well enough alone, I first wanted to add a real time clock feature and pagebreaks in printing to Newsweep. After some time of playing, I decided to write my own version of a sweep program adding some features. The main features that I have added are listed below: <1> Pagebreaks and expanded TAB's when printing files. <2> Print tagged files. <3> Printing of .COM files. <4> Prints filename on printout. <5> Printer strings. <6> Printing multiple copies. <7> Clean abort of print. <8> A HEX dump facility for viewing .COM files (DDT type Dump). <9> An easier to use Set file attribute function. <10> If the user tries to View a .COM file, it will simply give a HEX dump to the screen, the same goes for printing a .COM file <11> Real time display. <12> Moving files from one user area to another (without copying). <13> Library File Sweep Mode (View,Print,Extract). You will notice the lack of a squeeze facility. The reason for this is quite simple. At present, I don't know how to squeeze files. That is on my agenda of things to learn. When I do, I will incorporate this into the program also. This program is written with the standard CP/M assembler. Any comments or suggestions will gladly be accepted as well as a $10.00 donation if you enjoy using the program. This program is copyrighted and is given freely into the public domain, however, no part of this program is permitted to be used in conjunction with any sale whatsoever, without prior written consent from the author. CP/M 3.0 and MP/M B29 version 3.0x is the first version to be compatible with CP/M 3.0 and MP/M. Sort to Disk Option GONE ! Version 3.0 has lost the sort to disk option. It became a problem on many machines with hard disks to keep all of the directory information in concurrent RAM with B29 , its buffers and CP/M itself. It was almost impossible to use on a bulletin board system with a hard drive along with the RAM resident bulletin board software ( BYE etc. ). If, for example, you have a hard disk with 1000 directory entries, this will require 32K of RAM to hold the entire directory; coupled with the fact that B29 uses 14K and has an 8K general purpose buffer, this accounts for 54K of a 64K RAM system and could easily clobber CP/M. In order to make the program as universal as possible, I reluctantly decided to remove the sort to disk option. Send Comments To: Infinity Design Concepts Gary Conway 1052 Parkway Drive Louisville, Kentucky 40217 (502)634-0054 - OR - E-MAIL c/o The SoftStone RCP/M (FOG #24) Louisville, Kentucky (502)241-4109 Leave Message to My Attention OR to the SYSOP ERRORS CAUGHT BY B29 1. BDOS error on X: select - When selecting a new drive, B29 checks first to see if the drive is indeed on line before actually making the drive selection. This is done with a BIOS call as opposed to a BDOS call to avoid the inherent BDOS checking procedure. 2. COPY to same drive/user - This is something that most people and filename would not wish to do and B29 will not allow this. 3. ANY operation on an R/O file - If the user tries to copy over or delete an R/O file, the user is advised of this condition and is asked whether or not to proceed with the operation. 4. No directory space left - If a copy operation is attempted to a disk that has no directory space available, the user is advised of this and the copy is aborted. 5. No space left on dest. dr - If a copy operation is attempted to a dr. that has no space left or if the drive runs out of space before the copy is complete, the copy is aborted. G E N E R A L 1. Upper or lower case may be used throughout the program. 2. Carriage return aborts any operation or question. 3. Any operation or prompt may be aborted by simply hitting . 4. Any attempt to VIEW,PRINT or DUMP Squeezed files, will cause the file to be unsqueezed first. 5. Viewing an .LBR file will envoke Library File Sweep Mode. The listing below shows which functions operate on single files and which functions operate on several files. SINGLE OPERATIONS MASS OPERATIONS 1. Single file copy 1. Wildcard tag 2. Hexdump file 2. Mass copy 3. View file 3. Erase tagged files 4. Rename file 4. Move files to new user 5. Tag file 5. Print tagged files 6. Untag file 6. Unsqueeze files 7. Delete file 7. Rename files 8. Find file ----------------- ACKNOWLEDGEMENTS: I would like to thank several folks for their undying participation in the ever-important beta-testing stages as well as acting as sources of ideas and bouncing boards for my own ideas. I would like to thank Jerry Taylor (Mr. Find-a-bug himself), and Curt Edwards for ideas as well as testing on the ole OZZY. I would like to extend a hearty remote thanks to Steve Sanders for his idea of putting the installation parameters at the start of the program, which ultimately led to the creation of the B29INST.COM program, as well as his supplying the source to Unsqueezing files. I would also like to express my appreciation to Ernest Dryden (SYSOP FOG#23) for his aid in the implementation of CP/M 3.0 and for his aid in debugging the 3.0 version also. INVOKING B29 There are several ways to call B29. A0>B29 * logs all users on the default drive A0>B29 B logs drive B in the current user A0>B29 B3 logs drive B in user 3 A0>B29 B12 logs drive B in user 12 A0>B29 B* logs drive B all files in all users A0>B29 B7* logs drive B user 7 and displays all files in all users A0>B29 B12;*.COM logs B, user 12 and all .COM files A0>B29 B*;*.COM logs all users and all .COM files The bottom line is that you may use just about any command line that makes sense to you. All CP/M wildcards are also valid. If an invalid drive designation is given, then the default drive and user are logged in. After B29 begins execution and it has read and sorted the disk directory, the user is asked if he wishes to write the sorted directory back to the disk. If the user chooses to do this, then the disk directory will be written back to the disk in a sorted and packed fashion. The packing feature removes all deleted filenames from the directory. This is the only point in the program where the user may write the sorted directory back to the disk. One might ask why not do it every time that you log in a new disk. This was a point of some thought and discussion and the resultant decision to offer this only once was made in an effort to keep this selection in the realm of options rather than a nuisance. It is not that often that one wishes to sort and pack the disk directory. Once the directory is sorted to disk, then there is no way to recover any ERAsed files with UNERA.COM or other such programs. Also, after the disk directory is sorted, when the user uses the DIR command in CP/M, he will see a sorted directory. The sort format is USER AREA, FILENAME, FILE EXTENSION. This format is not quite the same as NSWEEP. The result is that all files will be shown in ascending user areas with the filenames subsorted within each user area. The potential problem here is if the user logs ALL users and has the same file in two or more user areas and wishes to FIND the file. The FIND command will only find the first occurence. -------------------- RETAG FILES command This option will retag files that were previoulsy tagged before any mass operation. ------------------- FORWARD ONE FILE command This command will move to the next file in the list. Carriage return will move one file only, while the space bar will move forward continously. ------------------- BACK ONE FILE command This option moves the cursor back one file in the directory. When at the beginning of the directory, the cursor is returned to the last file. ------------------- COPY SINGLE FILE command This option will copy a single file to any drive/user. If only the drive or drive and user codes are given, then the file is copied with the same name. If an attempt is made to copy to the same drive and user as the original file, then the copy is simply not made. Valid entries are: B B3 B12 B3: B3;MICKEY B12:MICKEY.MSE or any combination thereof. No wildcards are permitted here. If no filename is given, then the file is copied to the destination drive/user with the filename unchanged. The "Verify" option, if selected, will reread the destination file and check the CRC value with the value of the original file and report any mismatch. ----------------- DELETE CURRENT FILE command This option will delete the current file. If the file has been set to R/O, then another message is given and the user is asked if he still wishes to delete the file. If he does, he must answer with 'Y" or 'y' and the file will be deleted, otherwise there is no deletion. A carriage return alone at any of the prompts will abort the delete operation. The file will be deleted from the disk directory as well as from the directory in RAM that B29 uses. The file number that had been assigned to that file will no longer be displayed on the screen and the remaining files will not be renumbered. This was done purposely so that if a file is deleted and then later you ask yourself what you had just deleted, you will have some idea because of the missing file number. If you must renumber, just log the drive in again. -------------------- ERASE TAGGED FILES command This option will only delete the tagged files, whereas Newsweep would delete either tagged or untagged files. After a great deal of thought and discussion, I decided not to include the option to delete tagged or untagged files, because this seems too dangerous and I personally have only used the deletion of tagged files. If the file is R/O, the user will be prompted as with DELETE. -------------------- FIND FILE command Enter any filespec or wildcard filespec and the program will locate the first file that complies. This may be as brief as a single character or as complex as wildcards will allow. WS???.COM ?-GETS.* B*.* B29*.C?? DD etc... -------------------- LOG NEW DRIVE/USER/MASK command This option allows logging in of a new drive or user or mask. The minimum requirement is the drive code. The drive code is checked to see if that drive is on line. If it is, processing continues, however, if it is not, a message is displayed and the user is prompted to log in a new drive/user. The user may wish to give the user number or '*' for all users or a mask such as *.com, which will log in all .COM files. You can also omit the drive and just give the user and B29 will log you into that user on the previously selected drive. B B: (or ;) B0;*.COM B12;WS??.COM B*:WS*.* etc... -------------------- MENU or command The menu is displayed initially when B29 is called and each time a new drive is logged. To display the menu at any other time, hit the question mark key. This may be done with or without the shift key. In other words, the menu is called by '?' or '/'. Total disk space is also shown. --------------------- TAG FILES command This option tags files for mass operations copying or setting file attributes, etc. The screen will show the number of K-bytes that have been tagged including the currently tagged file. If inverse video is active, then these will be shown in inverse video. After tagging the current file, the current file pointer is incremented to the next file. ---------------------- UNTAG FILES command This command is the opposite of the TAG command in that it untags the current file (if tagged) and subtracts the file size from the number of tagged bytes and displays the new total. ---------------------- WILDCARD TAG command This command allows tagging of any or all files using CP/M wildcards. Any wildcards or even an unambigous filename may be used. See FIND command. ---------------------- MASS COPY command This command will allow copying of all tagged files to any drive and or user desired. To abort any copy, simply hit any key during the copy operation and when the current file is finished copying, the copying process will be aborted with a message to that effect. The remaining files that have not been copied, will still be tagged. The files that have been copied, are put into an "already copied" state, signified by a "#" in place of "*". B29 knows which files are currently tagged (*) or "have been tagged"(#) and can use this for RETAGGING. All files that are set to "#", will be retagged when using the (A), retag command. This option also allows CRC. (see SINGLE COPY) -------------------- VIEW FILE command The view command will print the current file onscreen. At this point B29 will check to see if this is a squeezed file and unsqueeze if necessary. If you try to view a .COM file, normally you would see garbage on the screen, however B29 will catch this and do a HEXDUMP instead. If the user tries to VIEW a Squeezed file, the file will be unsqueezed first. The file will be presented one screen at a time. To view the next screen, simply hit , for the next line, hit -SPACE BAR-. To abort hit "A" or "a". When finished, the screen will be cleared and you will be returned to the command mode. LIBRARY FILE SWEEP MODE B29 allows viewing, printing and extracting files from libraries. This mode is invoked by positioning the cursor on the .LBR file and then using the 'V' command. B29 will intercept the view command and initiate the Library File Sweep Mode. This mode of operation is very similar to the Normal Sweep Mode. The screen will clear and a list of commands is shown. There is no tagging allowed here. All operations deal with single files with the exception of Extract All, which will do exactly that. All of the commands in the menu operate the same as the Normal Sweep Mode commands. ------------------ HEX DUMP FILE command This command will take ANY file and dump it in HEX format to the screen for viewing. The options available are the same as with the VIEW command. Squeezed files will automatically be unsqueezed. This is a HEX/ASCII dump. ______________________ RENAME FILE command The rename function will do exactly that. The user may give as many characters as he wishes for the new filename up to the CP/M limit of eight. The extension is (as with CP/M) optional. This function also checks to see if the new name already exists on the disk and if it does, a message is issued and the rename is aborted. The rename function also has the capability to do wildcard renaming. By entering "*" in response to the rename prompt, the user will be asked for the OLD filename (*.COM, WS*.* etc.) , followed by the NEW name, which has the same syntax as the OLD filename. FOR EXAMPLE: To rename all of the .PRG files to .CMD, the user would give *.PRG for the OLD filename and *.CMD for the NEW name. This would cause all of the files with the .PRG extension on that disk to be renamed using the .CMD extension. --------------------- SPACE ON DISK command The checkspace function will ask for which drive to check space on, check to see if that drive is on line and if it is, the bytes used and space remaining are displayed. If the selected drive is not on line, the user is prompted for one that is. The block size is also shown. This is the minimum file size on your machine. -------------------- MOVE FILES command This function will move TAGGED files from one user area to another. There is no copying involved since the directory is read and scanned for matches of the tagged files and then the user number is changed to the new value. NOTE: This command will OBVIOUSLY NOT moves files to a different user area on another disk! Sorry, but you still have to copy... ____________________ SET FILE ATTRIBUTES command The set file attributes function works with TAGGED files only. The user will first tag the files that are to have certain attributes set or reset and then select the option. B29 then asks which attributes are to be set (SYStem DIRectory R/O - read only or R/W - read write). The attributes that have been set will show up as inverse characters when B29 lists the files. These "status" bits are located in the Extension portion of the filename. The first byte of the extension ("C" in a ".COM" file) holds the R/O or R/W attributes. The "O" byte holds the SYS or DIR attributes. What really happens here is that with normal ASCII characters the high bit is zero. If you look at an ASCII chart and in particular, the HEX values, you will notice that the chart stops at 7F. 7F(HEX), in binary, is 01111111, the high bit being zero. All other ASCII values are smaller than this, therefore, their high bit is also zero. CP/M does not use this bit when opening a file, in other words, if you give CP/M a filename with the ASCII character "A" which is 41(HEX), you could just as easily have given C1(HEX). 41(HEX) = 01000001 binary and C1(HEX) = 11000001 binary. The only difference is the high order bit. The purpose of these attributes is given below: SYS ....... The file will not be shown when using the CP/M DIR command DIR ....... The file WILL be shown with the DIR command R/O ....... A read only file cannot be deleted or written to by any normal CP/M commands. R/W ....... A read write file is the normal setting for CP/M files, i.e. they can be read, written, deleted. ---------------------- PRINT TAGGED FILES

command The print files command will print all tagged files. When the PRINT option is selected, the user is prompted for a printer pitch. The code for the printer in use should have been installed with B29INST.COM prior to printing, in order to work correctly.(See User Patch Section).The files will be printed with the filename printed on the printout at the top. Tabs will be expanded to 8 characters. Pagebreaks are also provided with 56 lines per page and 80 columns per line. The retag command can also then be used to retag the files to be printed again for those of you that are into printing copies for your friends. If any one of the following file types is tagged for print, they will instead be HEXPRINT-ed. COM REL OVR OVL DBF DAT DTA HEX OBJ Also, their squeezed counterparts will be HEXPRINT-ed. ----------------- Printing Multiple Copies This option will allow printing up to 99 copies of any given file. When you have positioned the cursor beside the file that you wish to print copies of, hit the + key. You will be asked how many copies to print and the printer pitch and off you go. Note that this does not apply to tagged files as with normal printing, but only to the "Current File". * * * * * * * * * * U S E R P A T C H E S * * * * * * * * * * The installation program (B29INST.COM) will install certain features into B29, such as printer strings and video sequences. When the install program first comes up, the user is prompted for the drive where B29.COM is, so that B29INST knows where to put the new codes. When the drive is given, the install program looks on that drive to insure that B29.COM is indeed there. If it is not, the user is advised of this and has the opportunity to retry or abort. When entering code sequences with the install program, it is not necessary to look up strange and ambiguous codes, since most manuals provide the codes in several "dialects" anyway, this should be easy. For example, if the printer manual says that the code for 12 cpi (ELITE pitch) is "ESC Q", then at the prompt for 12 cpi, the user would hit the ESCape key and then the Q key. All of the codes to be installed allow a maximum of three characters, which should be sufficient for any printer. To NULL a string, use the -SPACE BAR-. Strings can be NULLed for those machines not having any video sequences. THE CLOCK SHOULD ALSO BE MADE INACTIVE ON ALL MACHINES EXCEPT THE KAYRPO'S WITH THE REAL TIME CLOCK BUILT-IN. The "REMEMBER CURSOR POSITION" and "STATUS LINE PRESERVATION" functions should be NULLed out for non-Kaypro Real time Clock machines as well. These two codes are only used on the Kaypro and can serve no purpose on any other machines. The "CUSTOM CURSOR" should also be disabled on non-Kaypro machines since this routine calls specific ports, it will cause B29 to bomb on other machines.The lines per page and lines per screen codes can be entered in decimal, however, B29INST will not allow more than 66 lines per page. The default values shown in the installation program are taken from the actual COM file, that is you are shown what the current values are before you change them. To make the changes permanent, select the "X" option and you will be prompted for Saving the changes or Aborting the session. NOTE: Gemini 10x and Starmicronics 10x owners. The printer manual is misleading as far as the printer strings are concerned. The book shows the codes for character fonts as ESC "B" n and chr$(27) chr$(66) chr$(n). The "n" when used for fonts is NOT an ASCII number 1 or 2 or 3, it is instead a HEX 1 or 2 or 3. When using the install program to install these printers, you must use ^A for 1, ^B for 2 and ^C for 3. Example: To install the PICA pitch string, you would type, ESC B ^A. NOTE: ( Reiterating ) If you are not using B29 on a Kaypro with the built-in clock, you MUST disable the CLOCK, CUSTOM CURSOR, REMEMBER CURSOR POSITION, STATUS LINE PRESERVATION options with B29INST.COM as these options are Kaypro specific. Ok Hackers, here we go. A little prayer of thanks to DDT and off we go! The installation program (B29INST.COM), will install the following bytes into B29, however, the table below is provided as a reference for those with other things in mind. - PATCH LOCATION - - LABEL - - BYTES AVAIL - -FUNCTION- -------------------------------------------------------------------------- Decimal Hex -------------------------------------------------------------------------- 361 0169 IRV OFF-> - 6 - Inverse Video OFF 377 0179 IRV 0N-> - 6 - Inverse Video ON 392 0188 STP ON-> - 3 - Preserve Status Line ON 404 0194 STP OFF-> - 3 - Preserve Status Line OFF 419 01A3 RC-> - 3 - Remember Current Curs. Pos. 427 01AB GRC-> - 3 - Go Last Rem. Curs. Pos. 436 01B4 LP-> - 1 - Lines per Page, Printer 441 01B9 LS-> - 1 - Lines on Screen 446 01BE CLS-> - 3 - Clear Screen Code 455 01C7 PICA-> - 3 - Select 10 cpi 465 01D1 ELITE-> - 3 - Select 12 cpi 476 01DC COMPR-> - 3 - Select 17 cpi 487 01E7 CLOCK-> - 1 - Clock Enable 00=y C9=n 495 01EF CURSOR-> - 1 - Cust Cursor Enable 00=y C9=n -------------------------------------------------------------------------- The labels shown above can be found in the first two sectors of the .COM file as DDT's HEX/ASCII dump will show them up. The bytes immediately to the right of the "->" portion of each label is where the actual code resides. The patch locations shown represent the starting address of the label. After patches are complete, you can save the new image with ... A0>SAVE 64 B29.COM. There is a table in the COM file, which is a list of all the file extensions that will automatically be hexdumped if the user tries to VIEW them. The list is marked in the file by an ASCII marker; HEX-DUMP TABLE The table follows: REL RQL COM CQM OBJ OQJ HEX HQX DTA DQA OVR OQR OVL OQL DBF DQF DAT DQT FF The byte at the end of the table (FF) must remain, as it is the end of table delimiter for the routine that scans the table. The spaces shown between the extensions in the above table are shown here merely for clarity, as they are run together in the actual table in B29.COM. The extensions in this table can be modified or deleted, but there are a few precautions. If it was desired to remove an entry from the table, it is not possible simply to delete it. If an entry was deleted and replaced with spaces, then any file that did not have an extension would be hexdumped. It is necessary to have the table contiguous with no spaces and an FF byte at the end. To remove an entry from the table, it would be easiest to move the last entry to the spot where an entry is to be removed and then move the FF byte to the new end of table. Also note that the table is not expandable, i.e. do not move the table past the FF byte! I am one who cannot leave well enough alone and always seem to have to add something else to a program, the above information is for those of you who are of the same state of mental disorder as I. If you are into some serious patches, I would be interested in what they are as well as offer assistance if needed. This whole program came about because I wanted to patch the real time clock in the Kaypro 4-84 into NSWEEP, consequently I encourage user patching and will help when asked. W_A_R_N_I_N_G If you patch into the wrong area, as with any program, B29 will not work. If any of the copyright messages are removed, B29 will issue a message and exit and you will need a fresh copy of B29. * EOF:B29xxx.WS