DOC 1.1 documentation file ----------------------------------------------------------------------- Please note - this is a plain ASCII text file but it contains multiple documents each separated by a title line beginning with two @ signs. You may find it most convenient to view or print this file using the DOC.EXE program supplied. ----------------------------------------------------------------------- Title1:PC MAGAZINE Title2:Power Pack Volume 1 Copyright:(C)1993 Ziff-Davis UK Ltd @@Introduction Introduction PC Magazine Power Pack Volume 1 ------------------------------------------------------- Welcome! This disk is one of three making up the PC Magazine Power Pack, a collection of the top utilities from the PC Magazine utility library. Volume 1 features general-purpose utilities and handy little applications like TRACKR and CARDFILE, along with utilities to enhance batch files and DOS command line operation. Program Summary --------------- General-purpose programs ------------------------ ADDIT Pop-up addition program CALC Pop-up programmer's calculator CARDFILE Pop-up address book and dialler COMPUTE Command line calculator CONVERT ASCII, dec, hex & binary converter HC Long precision calculator JOURNAL Pop-up expense account manager LOCK & UNLOCK Encrypt sensitive files PARSE Count words and sentences PCREMOTE Control a remote PC by modem PCSORT General purpose sort utility SCHEDULE Pop-up diary TED Tiny full-screen text editor TRACKR Time recorder and manager ZCOPY PC to PC serial file transfer Command line utilities ---------------------- ALLKEYS TSR hotkey controller ALIAS DOS command line editor APPBK Pop-up appointment book ASC Pop-up ASCII chart CDX Enhanced change directory command CHANGE Fast search-and-replace DOSCLIP Cut and paste between programs FREEZE Lock the keyboard INSTALL & REMOVE Load and unload TSR programs NO Run command on all files but... RUN Run programs from any directory SWEEP Run command in all subdirectories WAITASEC Scroll back DOS display Batch file utilities -------------------- ALTPAUSE Pause on Alt key ANSIHERE Test for ANSI.SYS loaded BAT2EXEC Batch file compiler BATCHMAN Multi-function batch file enhancer BSAVE & BLOAD Save and reload screens DRAW Draw pictures in batch files PLAY Play tunes in a batch file PUSHDIR & POPDIR Save and restore current directory The PC Magazine Utility library ------------------------------- These programs are taken from the library of utility programs originally written for the US edition of PC Magazine. More information on these and the other programs in the library is available on-line in the ZiffNet forum on the CompuServe Information Service. Where do I go from here? ------------------------ For more information about installing and running these programs, see the 'Tech Notes' document. If you're reading this in the DOC documentation viewer provided, press the Left arrow key to go back to the document list on the left and then the down arrow key to highlight 'Tech Notes'. It is a good idea too to make sure that you read the instructions for each program fully before trying to use it. @@Tech Notes Technical Notes PC Magazine Power Pack ------------------------------------------------------- This document provides additional information on setting up and using these utilities and on using the documentation viewer program. Installing the programs ----------------------- To install these programs to a hard disk, use the install program provided (started by typing GO). Note that you can try out or use the programs directly from the floppy if you don't want to install them onto your hard disk straightaway. For example, to try the PRUNE program out, follow steps like these: * Insert the disk containing PRUNE (volume 2) * Enter A: (or B:) at the DOS prompt to log onto the disk * Enter PRUNE to run the PRUNE program Installing the programs from DOS -------------------------------- You can install all of the programs or just selected ones using the DOS COPY command in the normal way. For example, to install the FSIZE program, you might: * Insert volume 2, the disk with FSIZE on it * Enter A: (or B: if appropriate) to log onto the disk. * Enter COPY FSIZE.COM C:\UTILS to copy the FSIZE program to an existing UTILS directory on your hard disk drive C. Most of the programs use their own name for a filename (for example, the CHKFRAG program is in the file CHKFRAG.EXE). The programs will be either .COM or .EXE type files. Use the DOS DIR command to find out the filenames you need for your COPY command. Installing volumes 1, 2 and 3 together -------------------------------------- You can opt to install all three volumes in the Power Pack into a single directory on your hard disk so that all the programs are together. This is a convenient arrangement and saves disk space. To do this using the GO program, install each disk in turn but select the same directory, for example C:\PCMAG, each time. Some files, such as PACKING.LST and DOC.EXE, are installed by each volume. When you come to install volumes 2 and 3, GO will warn you that these files already exist as they will have been copied to your disk when you installed volume 1. You should choose the 'Skip this file' menu option to continue the installation. If you do install all three volumes to one directory, the DOC documentation program will present a menu of files when you start it with the command DOC. You can also switch between the manuals for the three disks by choosing 'Select document file' from the DOC menu. If you want the instructions for a particular program, you can still enter DOC followed by a space and the program name when you start it (for example, DOC ANSI). DOC will search all three manuals for the right document and open the correct file. If you know which file the document is in, you can reduce the search time by giving its name on the command line too, for example DOC MANUALS3 ANSI. Running the utilities --------------------- These utilities are all individual programs which should be started or loaded from the DOS prompt as needed by entering the relevant command (usually the program name followed by a space and any parameters that particular program needs). Read the documentation for a particular program before trying to use it. This will give a guide to the command format needed to use the program and in some cases a few examples to show you how it works. Please note that there is no overall menu or front- end for the utilities as this isn't really an appropriate way to use them. In general, the way to run a particular program is to change to the drive and directory where it is stored and then enter the relevant command. For example, if you want to run the DIRMATCH program, and you install these programs to a C:\HOTUTILS directory, you might enter: C: change to drive C CD \PCMAG2 change to the volume 2 directory DIRMATCH start DIRMATCH Putting the programs in your DOS command PATH --------------------------------------------- You can start DOS programs by either changing to the drive and directory they are in and then entering the relevant command or, if you have DOS 3.0 or later, giving the relevant drive and directory before the command name (e.g. enter C:\PCMAG2\PRUNE to start PRUNE from a PCMAG2 directory on drive C). However, it is most convenient if you place the programs in your DOS command search path... a directory that is mentioned in your current PATH command. You can do this by either: * Adding the directory the program is in to your normal PATH command in AUTOEXEC.BAT. For example, if the PATH command in your AUTOEXEC.BAT file reads C:\DOS;C:\WINDOWS and you have installed all the programs to a C:\PCMAG directory, you might change it to read C:\DOS;C:\WINDOWS;C:\PCMAG You should be careful when making changes to AUTOEXEC.BAT not to disturb other commands already in it. See your DOS manual for full instructions. or * Copying those programs you use often to a directory already in your PATH command. Many PCs already have a directory called \BIN or \UTILS for small utility programs like these. For example, if you have a \BIN directory on drive C and use the HC program often, copy it across with a command like this: COPY C:\PCMAG1\HC.EXE C:\BIN Loading programs from AUTOEXEC.BAT ---------------------------------- Some of these utilities are designed to be loaded or run whenever your PC is working by placing the relevant command in the AUTOEXEC.BAT startup file. Please bear in mind: * The program file must be available for AUTOEXEC.BAT to load it. If it is not in a directory already named in a PATH command earlier in AUTOEXEC.BAT, you must give the drive and directory where it is stored (e.g. C:\PCMAG1\ADDIT) or copy the file to the root directory of the hard disk. * The order in which resident programs are loaded can be significant. If there appears to be a conflict, try re-ordering the lines in AUTOEXEC.BAT. * Always keep a startup floppy to hand and a back-up copy of your AUTOEXEC.BAT file so that if problems arise you can restore things to normal. Using TSR (memory-resident) programs ------------------------------------ Some of these utilities are 'TSRs' or memory-resident programs. These load into memory when first started and remain there, either operating invisibly or waiting to be called up. TSR programs are very popular and those on this disk are carefully written and fully tested. However, the design of DOS means that there is always a chance of conflict between different TSR programs or between a TSR and your main software. To avoid problems, please note: 1. You should carefully test any new TSR program on your system before using it while doing your normal work. 2. Each TSR uses up memory. If you load too many at once, your normal software may not be able to run. 3. If you discover a conflict, loading the TSRs in a different order may resolve it. 4. You can sometimes change the 'hotkey' used to call up a TSR to avoid a conflict with keys used by your other programs. PACKING.LST file ---------------- A complete index of all the files on all three volumes is provided in a text file called PACKING.LST. This is arranged with details of one file per line so that it easy to search using a program such as the DOS FIND command. Use this file to help you locate particular programs or to identify the contents of various files. Viewing and printing the documentation -------------------------------------- A simple on-disk documentation viewer and printer is provided in the program file DOC.EXE. The documents for this are stored in the files MANUALS1.TXT, MANUALS2.TXT and MANUALS3.TXT, one for each volume. You can start DOC by changing to the disk and directory containing it and entering DOC. DOC command line ---------------- The easiest way to start DOC is just with the command DOC. However, you can add either the name of a particular documentation file or of a particular document to the command. For example, DOC MANUALS3 Starts DOC with MANUALS3.TXT loaded. This form is only needed if you have more than one document file in the current directory and want to load a particular one straightaway. DOC CALC Starts DOC with the instructions for CALC selected. It may take a moment or two for DOC to locate the relevant document. DOC MANUALS3 BROWSE Stars DOC with the MANUALS3 file, open at the instructions for BROWSE. Running DOC ----------- DOC displays a list of available documents down the left side of the screen and shows the text of the currently selected document on the right. To select documents, use the up and down arrow keys to move through the list on the left. Typing the initial letters of a document name will jump directly to the next matching document. Once you've found the document you want, press TAB or the right arrow key to move to the text of the document on the right. The cursor keys (Home, End, Up, Down, PgUp, PgDn) will now move through the text. Press the left arrow or TAB key again to go back to select other documents. The DOC menu ------------ To call up DOC's menu, press the ESC key. DOC presents various options which you can select with the cursor and Return keys or by pressing one of the highlighted letters. The options will vary depending on your PC's configuration and the document files available. Pressing ESC a second time cancels the menu. Quitting DOC ------------ Choose the Quit option from the menu to leave the DOC program and return to DOS. Colour display off ------------------ Choose Colour display off from the menu to ask DOC to work in black-and-white. You may wish to do this if you're using a laptop with an LCD screen that doesn't show colours well or with some greyscale or CGA composite video monitors. This menu option does not appear on PCs that do not have a colour capability. Extended screen on ------------------ Choosing this menu option switches the display to 43 or 50 lines so that you can see more text without scrolling. You can go back to the normal display by choosing Extended screen off subsequently. This menu option is only available on EGA or VGA equipped PCs. If you have a Super VGA display card and a program to set extended text modes, such as 60 lines deep, you might like to try setting an appropriate mode before starting DOC... the program will operate correctly with many non-standard Super VGA formats. Fast screen on -------------- This menu option only appears on PCs fitted with CGA or equivalent displays. Normally the DOC program deliberately slows down on this type of display to prevent the screen flicker or 'snow' that some CGA displays can suffer from. If your system does not suffer from snow, choose 'Fast screen on' for a faster screen display. There's no harm in trying this option either way on your PC... snow does no harm and you might prefer to have a fast display that flickers to a slow one that doesn't. Print Document -------------- Choose this menu option to print the currently selected document. A menu appears from where you can make four print settings, choose Go to start printing or Cancel to return to viewing documents. You may need to alter the settings to suit your system before choosing Go as follows: 1. Output port This is the printer interface that DOC should print the document to. By pressing O you can step through the ports fitted to your computer. The default LPT1, the first parallel printer port, is correct for most PCs. DOC can work with a serial printer (COM1 or COM2) if you have one but you must make sure that the port is correctly set up (e.g. with a command such as MODE COM1:9600,n,8,1,p) BEFORE running DOC. X-On/X-Off handshaking is automatically provided for serial printers. You can set the output port to "FILE". In this case, DOC will ask for the name of a disk file when you start printing and will then print to disk rather than to a printer. If the file you name already exists, DOC will append pages to it. DOC does not support PostScript printers. If you have one of these, you might like to use the print to FILE option and then use a PostScript conversion program or word processor to print the resulting file. 2. Lines per page This is the number of printable lines on each page on your printer. DOC will print with this set incorrectly but will not be able to put page breaks and headers in the right place. The default is 70 lines for A4 fan-fold paper at 6 lines per inch, typical of many dot-matrix printers. Other common values are 64, 66 and 72. If you have difficulty with this setting, a workaround is to set the form-length correctly on your printer, enter a small number of lines per page (e.g. 60) and then select the "Use form-feeds" option. 3. Use form-feeds Set this option to Yes if you're using a LaserJet- style printer or any printer with the form-length set correctly. DOC will work with this option set to No by counting output lines but this is slower. 4. Pause between pages Set this option to Yes if you're feeding single- sheets to the printer... DOC will pause for you to get the next sheet ready between each page. Select document file -------------------- This menu option only appears if you have more than one DOC documentation file in the current directory when you start DOC, for example if you install all three volumes to the same directory on your hard disk. Using this option, you can switch from one file to another without leaving DOC. Using document files without DOC -------------------------------- The DOC document files can be accessed by programs other than DOC though this may not be as convenient. They are plain ASCII text files, with a line-feed/carriage return pair at the end of every line so they can be viewed with normal DOS commands such as TYPE MANUALS1.TXT | MORE or COPY MANUALS1.TXT PRN, text editor programs or other file viewers and browsers. The only unusual aspect is that the file contains multiple documents separated by lines beginning with two @ signs and a title for that particular document. DOC uses these to provide its list of available documents. If you're using the files outside of DOC, you may wish to break them up at these lines. Customising the utilities ------------------------- Some of these utilities are compact assembly language .COM programs to make them small, fast and efficient. This means that some of the programs do not include built-in configuration options. However, if you're experienced with DEBUG, you can 'patch' the programs to customise their operation. The manual for each program will describe the ways in which it can be customised but typically you can do so to: * Customise the screen colours the program uses (if the display is hard to read on your screen). * Change the 'Hotkey' used by one of the TSR programs to avoid a conflict with your other software. * Change defaults such as sorting order, size of records and so on. To customise a utility, follow this general procedure in conjunction with the manual for the program. (You SHOULD NOT ATTEMPT this if you are not confident about using DEBUG as a mistake may stop the program from working or even crash your PC.) 1. Always MAKE A COPY of the .COM file for the program in question as a back-up. For example, assuming you were patching a program called POP-CAL.COM, you might enter: COPY POP-CAL.COM ORIGCAL.COM 2. Start DEBUG with the name of the program to modify. You must have the DOS DEBUG program available for this to work. For example, enter DEBUG POP-CAL.COM DEBUG loads the file and presents a - prompt. 3. Use the DEBUG E command to modify the areas of the program as described in its documentation. For example, assume the hotkey for POP-CAL can be changed by entering a new keyboard scan code at location 174. If we wanted to use Alt-P rather than Alt-C we can see from the scan code (SS) table below that we need to change this to code 19. This can then be entered in DEBUG with: E174 19 4. After making all the necessary changes, save the file back onto disk with the W command. Enter W 5. Now leave DEBUG. Enter Q 6. Now load and test out the new program. If it no longer works, delete it, restore your back-up copy (e.g. COPY ORIGCAL.COM POP-CAL.COM) and then try again. The tables below list the values necessary for customising colours and hotkeys. Keyboard scan codes for alternative hotkeys (Values for SS) ----------------------- Scan Scan Key Code (hex) Key Code (hex) -------- ---------- --------- ---------- Esc 01 Z 2C 1 ! 02 X 2D @ 2 03 C 2E # 3 04 V 2F $ 4 05 B 30 % 5 06 N 31 ^ 6 07 M 32 & 7 08 < , 33 * 8 09 > . 34 ( 9 0A ? / 35 ) 0 0B R Shift 36 _ - 0C PrtSc * 37 + = 0D Alt 38 Bkspace 0E Spacebar 39 Tab 0F CapsLk 3A Q 10 F1 3B W 11 F2 3C E 12 F3 3D R 13 F4 3E T 14 F5 3F Y 15 F6 40 U 16 F7 41 I 17 F8 42 O 18 F9 43 P 19 F10 44 { [ 1A NumLock 45 } ] 1B ScrlLk 46 Enter 1C 7 Home 47 Ctrl 1D 8 UpArr 48 A 1E 9 PgUp 49 S 1F - 4A D 20 4 LArrow 4B F 21 5 4C G 22 6 RArrow 4D H 23 + 4E J 24 1 End 4F K 25 2 DnArr 50 L 26 3 PgDn 51 : ; 27 0 Ins 52 " ' 28 . Del 53 ` 29 SysReq 54 L Shift 2A F11 57 | \ 2B F12 58 Shift Mask codes for alternative hotkeys (Values for MM) ----------------------- Value Alt Ctrl L-Shift R-Shift ----- --- ---- ------- ------- 0 1 X 2 X 3 X X 4 X 5 X X 6 X X 7 X X X 8 X 9 X X A X X B X X X C X X D X X X E X X X F X X X X X signifies that this key must pressed. For example, to use Left Shift and Right Shift for the hotkey, the value to use for MM would be 3. Colour values --------------- Black 0 Blue 1 Green 2 Cyan 3 Red 4 Magenta 5 Brown 6 Lt Gray 7 Dark Gray 8 Lt Blue 9 Lt Green A Lt Cyan B Orange C Violet D Yellow E White F A full colour value is two hex digits, the first for the background colour and the second for the foreground. For example, bright white on a dark blue background is 1F. Do not choose light colours (values larger than 7) for the background as it will produce a blinking display in most of the programs. @@ADDIT ADDIT Douglas Boling Pop-up addition program Version 1.1 ------------------------------------------------------- Purpose ------- ADDIT.COM is a small TSR (3.5K) that adds negative & positive numbers on your screen. You simply block the on-screen area that contains the relevant numbers, hit the Plus key, and then you can paste the displayed total either into the same or another file. Format ------ ADDIT [/U] [/B] then - Remarks ------- When entered on the DOS command line or as a line in your AUTOEXEC.BAT file, ADDIT installs itself in memory and waits for you to call upon its services. The /U switch lets you uninstall the program, freeing any memory it used. The only restriction on unloading is that if any additional TSRs were loaded after ADDIT, they must be removed before uninstalling ADDIT. Use the /B parameter, and ADDIT will use the video BIOS calls instead of writing directly to video memory. While this is much slower than directly writing to video memory, it can come in handy if you have a non-standard video board. If ADDIT wrote directly to the display memory of an incompatible adapter, you would see garbage on the screen or your machine might even lock up. The default hotkey to activate ADDIT is Alt-. The F1 key brings up a help screen. When you're done with ADDIT, press the Esc key and ADDIT will return to the background to wait for the next time it's needed. When you pop it up, ADDIT presents a one-line banner across the top of the screen and puts its own block cursor at the spot your program cursor occupied. The usual arrow keys move the ADDIT cursor, with the Home and End keys taking it to the beginning and end of the line. The PgUp and PgDn keys take you to the top and bottom of the screen. To block (or highlight) an area on screen, hold down the Shift key while moving the cursor. Since you will normally want to highlight a number of whole rows, the easiest technique is to go to the top line to be marked and hit the End key. Then, while holding down the Shift key, hit the Down Arrow key as many times as required. The section will then be highlighted. After releasing the Shift key, any subsequent cursor movement will unblock the highlighted area. To sum the numbers contained in the blocked-off area, simply hit the Plus key. (Either the Plus key on the numeric keypad or on the regular keyboard will do.) ADDIT can handle numbers with up to ten decimal places. The total will be displayed in the ADDIT banner and will be stored in a buffer so you can subsequently paste it anywhere. Positive numbers in the highlighted area will show up on colour screens in yellow (by default); negative numbers (those preceded by a minus sign) will be displayed in red (by default). This allows you to check that all of the numbers you want (and only the ones you want) included have been added. Note that if a dash (that is, the minus sign) occurs between two numbers, the second number will be considered negative. But if a dash is the last character on the line and a number begins the succeeding line, the hidden end-of-line marker inserted by some word processors can fool ADDIT into thinking that the number following is positive. Its colour will be your clue. Hitting the P key while ADDIT is active will paste the displayed sum at the cursor location. ADDIT then automatically exits but it continues to remember the total in its buffer. Thus, you can paste the same sum into several places or documents. If the point where you want to put the result is on a different screen--or in a different document, perhaps requiring you to exit your application and start up another--you first exit ADDIT by hitting the Esc key. Then find the insertion spot you want, bring up ADDIT again by pressing Alt-, and hit P. You can clear the banner and buffer at any time by starting to highlight a new area. Douglas Boling is a contributing editor of PC Magazine. History ------- Version 1.0 Initial Release Version 1.1 Bug Fix @@ALIAS ALIAS Douglas Boling and Jeff Prosise DOS command editing, recall and aliasing Version 1.1 ------------------------------------------------------- Purpose ------- A TSR utility that enables DOS command-line editing and recall of previously issued commands and that permits assignment of long commands and environment strings to short synonyms ("aliases") or function keys. Format ------ ALIAS [?][/U][/D][/E][/L][/F [d:][path]filename] [/Bnn][/M nn][/S nn][alias [command]] Remarks ------- When loaded without any of its optional switches, ALIAS reserves a buffer size of 512 bytes for user-entered alias strings and a command stack that permits recalling the last 16 commands issued. These defaults (/B 512 and /S 16) can only be changed at load time. At this time, too, the /F switch can be used with a filename (plus drive and path) containing regularly used aliases (see Note). Previously issued commands can be recalled to the command line with the Up and Down Arrow keys. When many commands are stacked, typing a few initial letters before hitting the recall key will speed retrieval by skipping commands that do not match the typed pattern. Use the optional /M nn switch, where nn is a number, to set a minimum length of command strings to be stacked. The default, /M 1, remembers all commands. Whether recalled or newly typed, command-line entries can be edited when ALIAS is loaded. The Left and Right Arrow keys move the cursor by character; Ctrl-Left and Ctrl-Right move by word; and Home and End go to the line ends. The Del and Backspace keys delete characters; Ctrl-Backspace deletes the word at the cursor; and Ctrl-End deletes to the end of the line. Pressing Esc clears the command line and returns to the bottom of the command stack. The Ins key toggles between overstrike (the default) and insert mode for character entry on the command line. The command ALIAS alias [command] is used to define an alias or command synonym. The alias variable may be any one-word alphanumeric string; the command variable may contain multiple words and must end with a carriage return. Defining an alias but omitting the command variable removes a previous alias assignment. Function keys and their Alt-, Shift-, and Ctrl- combinations may be used in place of alias by being designated thus: [Fn], [AFn], [SFn], [CFn], with 1 to 10 as the values of n. An asterisk after the close bracket (for example, [F1]*) causes immediate command-string execution when the function key is pressed; otherwise, Enter must also be pressed. The command variable may include replaceable command-line parameters, (for example, %1), as in batch files. Environment strings, such as the PATH string, may be used in the command variable by being placed between a pair of % signs. A list of active aliases can be obtained at any time by entering ALIAS with its /L switch. Alias processing can be temporarily disabled with the /D switch and reenabled with the /E switch. ALIAS ? brings up a help screen. The /U switch uninstalls ALIAS from memory, when possible. Note ---- A plain ASCII file containing regular user-defined aliases may be installed with the /F switch when ALIAS is loaded, as, for example, ALIAS /F C:\BIN\MYALIAS.TXT This file may be up to 32K and may also contain ALIAS optional switches. Note that // and /* may be used to add comments on the remainder of a line and that blank lines are not processed. @@ALLKEYS ALLKEYS Robert L. Morton TSR hot-key controller Version 1.0 ------------------------------------------------------- Purpose ------- Alternately disables and enables the hotkeys used by pop-up utilities so these key combinations can still be used by applications programs. Format ------ ALLKEYS POP-UP #1 POP-UP #2 POP-UP #3 ... ALLKEYS or ALLKEYS [/U] Remarks ------- ALLKEYS must be loaded twice, once immediately before and once immediately after loading the series of memory-resident (TSR) utilities whose hotkeys are to be controlled. Normally, this is done by making the appropriate entries in an AUTOEXEC.BAT file. After the second loading of ALLKEYS, the operation of the TSR programs in the controlled group is initially unaffected. Pressing Ctrl-Alt-Z, however, disables these pop-up programs by passing their trigger keys to an applications program instead. Pressing Ctrl-Alt-Z a second time re-enables operation of the controlled memory-resident pop-ups. ALLKEYS may be completely uninstalled by entering the command with the /U parameter. This might be used from the DOS prompt to change the set of pop-ups controlled by ALLKEYS. If TSRs, e.g. SideKick, have been loaded after ALLKEYS, complete deinstallation is not possible, but the /U parameter will still disable ALLKEYS' operation. When ALLKEYS is activated with Ctrl-Alt-Z, a series of beeps with a rising pitch is heard. A descending sequence of tones sounds when ALLKEYS is toggled off. Using the values for SS and MM shown in the Scan Code and Shift Mask charts at the end of this manual, the default hotkey for ALLKEYS can be changed with DEBUG, as shown below: DEBUG ALLKEYS.COM E 243 SS ;Scan code E 244 MM ;Shift mask W Q @@ALTPAUSE ALTPAUSE Provides a pause key for batch files Version 1.0 ------------------------------------------------------- Purpose ------- ALTPAUSE allows a batch file to pause at a certain point only if the Alt key is held down. You can also use ALTPAUSE to give the user a way to alter the normal operation of a batch file. Format ------ ALTPAUSE Remarks ------- On fast machines with fast hard disks batch files can fly by without giving you a chance to read messages or make choices. By inserting ALTPAUSE at key locations you can optionally pause batch file operation by pressing the Alt key. Operation will remain suspended until the key is released. If you ran the following TESTPAUS.BAT batch file: @ECHO OFF REM This is TESTPAUS.BAT ECHO This line goes by quickly ALTPAUSE ECHO This line goes by quickly ALTPAUSE ECHO This line goes by quickly (or a longer version of it) without pressing any keys, the batch file would simply print several "This line goes by quickly" lines. But if you ran it and pressed the Alt key, it would pause in midstream. ALTPAUSE also generates an exit code of 1 that can be read by the DOS ERRORLEVEL command and used to branch to a particular place in the batch file if the Alt key is pressed. For example, an AUTOEXEC.BAT file might normally start Microsoft Windows when the machine is started up. You could give the user the opportunity to go to the DOS prompt like this: @ECHO OFF CLS ECHO Hold and then release ALT key for DOS prompt ECHO instead of Windows... ... normal instructions in AUTOEXEC.BAT ... ALTPAUSE IF ERRORLEVEL 1 GOTO STOP WIN :STOP @@ANSIHERE ANSIHERE Test for ANSI.SYS Version 1.0 ------------------------------------------------------- Purpose ------- Quickly identifies whether or not ANSI.SYS is loaded from the command prompt or in a batch file. Format ------ ANSIHERE Some programs use ANSI.SYS to redefine keys or set screen colours. The DOS MODE command uses it to set the number of lines on-screen. You can tell whether ANSI.SYS is loaded by examining your CONFIG.SYS file, but ANSIHERE is easier. And, if used in a batch file, it sets an exit code of 1 that the DOS ERRORLEVEL command can read. This way your batch files can execute ANSI instructions only if ANSI happens to be loaded. @@APPBK APPBK Michael J. Mefford Pop-up appointment reminder Version 1.0 ------------------------------------------------------- Purpose ------- Reminds you of appointments at the times you specify; provides additional optional hourly chime and continuous on-screen date/time display. Format ------ APPBK or APPBK [f,][b,][s,][h,][a] Remarks ------- APPBK is a memory-resident utility that is normally loaded through your AUTOEXEC.BAT file. It must be loaded after any system time/date setting routines, and before loading SideKick (if used). Pressing Alt-R opens the on-screen APPBK window, in which you enter your appointments. Enter times as 2:00, not 02:00, and include the A or P before the M in the window. You can edit your appointment list using the F-1 and F-3 keys, by overstriking letters, and with the deleting backspace key. F-2 toggles an hourly chime on and off; F-4 similarly toggles a continuous on-screen display of the time and date. An alarm will sound at the appointment times specified. Additionally, should you be away from your desk and not hear the reminder, your first keystroke following the alarm will pop up the APPBK window. To close the window, press Esc or the Alt-R (default) APPBK trigger key. At the time it is loaded, APPBK may be given alternative parameters for its colour (f), border colour (b), trigger-key scan code (s), hourly chime frequency (h), and alarm frequency (a). The default values are 7,112,19,2217,2960. Tables of acceptable alternative parameter values are give below. In entering parameters, separate each with a comma. Commas alone may be used for initial parameters you do not wish to change. Example ------- APPBK ,,,1760 would change only the frequency (tone) of the hourly chime (the h parameter). Parameter Tables ---------------- COLOUR CODES (f and b parameters) Colour Adapter -------------- fore- back- fore- ground ground colour ground colour 0 0 Black 8 Gray 1 16 Blue 9 Light Blue 2 32 Green 10 Light Green 3 48 Cyan 11 Light Cyan 4 64 Red 12 Light Red 5 80 Magenta 13 Light Magenta 6 96 Brown 14 Yellow 7 112 White 15 Bright White Monochrome Adapter ------------------ fore- back- ground ground colour 0 0 Black 7 112 White 15 NA Bright White Add foreground colour to the background colour to arrive at parameter number. For example, blue letters on cyan (light blue) would be 48 + 1 = 49. Defaults are 7 (white on black) for the datebook field (foreground) and 112 (black on white) for the frame (border). SCAN CODES FOR ALT-KEY COMBINATIONS (s parameter) Code Key Code Key Code Key Code Key 16 Q 30 A 44 Z 120 1 17 W 31 S 45 X 121 2 18 E 32 D 46 C 122 3 19 R 33 F 47 V 123 4 20 T 34 G 48 B 124 5 21 Y 35 H 49 N 125 6 22 U 36 J 50 M 126 7 23 I 37 K 127 8 24 O 38 L 128 9 25 P 129 0 130 - Default is 19 (Alt R) 131 = TONE/FREQUENCY (h and a parameters) A 55 110 220 440 880 1760 3520 1740 14080 A# 58 117 233 466 932 1857 3714 7428 14856 B 62 123 247 494 988 1976 3952 7904 15808 C 65 131 262 523 1046 2093 4186 8372 16744 C# 69 139 277 554 1109 2217 4434 8868 17736 D 74 149 294 587 1175 2349 4698 9396 18792 D# 78 156 311 622 1245 2489 4978 9956 19912 E 82 165 330 659 1319 2637 5274 10548 21096 F 87 175 349 698 1397 2794 5588 11176 22352 F# 93 185 370 740 1480 2960 5920 11840 23680 G 98 196 392 784 1568 3136 6272 12544 25088 G# 104 208 415 831 1661 3322 6644 13288 26576 Middle C is 262. The defaults are 2217 (C#) for the hourly chime and 2960 (F#) for the alarm chime. Note ---- 1. While APPBK is compatible with most applications programs and resident utilities, complete compatibility cannot be assured. It cannot, for example, be used with XyWrite. @@ASC ASC Jeff Prosise Pop-up ASCII Chart Version 1.0 ------------------------------------------------------- Purpose ------- Provides a pop-up ASCII chart showing decimal, hexadecimal, and character equivalents for the full IBM character set. Format ------ ASC Remarks ------- ASC is a memory-resident utility that is normally loaded at boot-up, via your AUTOEXEC.BAT file. Once loaded, pressing Alt-A pops up the first page (32 ASCII codes) of the display window over any currently active applications program. The Up- and Down-Arrow, PgUp and PgDn, and Home and End keys access the remaining ASCII display pages. Pressing Esc closes the window, restoring the original screen display. In operation, ASC requires approximately 2.5K of RAM. It is compatible with most applications and TSR (terminate and stay resident) programs that do not themselves require the Alt-A key combination. Notes ----- 1. Users familiar with using DEBUG can modify the default border, text, and header colours of ASC. These values, initially 0Fh, 1Fh, and 1Eh, respectively, are located at offsets 014D through 014F in the .COM file. For use with a composite monochrome display, the values 70h, 07h, and 07h are suggested. @@BAT2EXEC BAT2EXEC Douglas Boling Batch file compiler Version 1.5 ------------------------------------------------------- Purpose ------- BAT2EXEC compiles your batch files to .COM files for added speed. Large batch files often run annoyingly slowly so BAT2EXEC is a good way to increase both your productivity and satisfaction. Format ------ BAT2EXEC FILE.BAT Using BAT2EXEC -------------- Daily PC operations are almost unimaginable without the use of batch files. Everyone has their favourite collection of them, and some users have constructed complex batch files of thousands of bytes that push the batch language itself to its limits. Programs that expand the available batch file functions, such as Michael Mefford's BATCHMAN, encourage users to make even larger batch files. Unfortunately, however, batch files are also notoriously slow. It can be almost painful to watch them scroll down the screen a line at a time. A standard way to improve the speed of interpreted programs, such as batch files, is to compile them. That's where BAT2EXEC comes in. Using BAT2EXEC could hardly be simpler. Just enter BAT2EXEC FILE.BAT where FILE.BAT is the name of your batch file. BAT2EXEC will then produce an executable .COM file with the name FILE.COM. If BAT2EXEC can't find the batch file, an error message will be printed. If BAT2EXEC can't understand a line in the batch file, it will print an error message indicating the line in the file in which it discovered the error. BAT2EXEC should not be used on every batch file. AUTOEXEC.BAT, for example, must remain a genuine batch file in order for COMMAND.COM to find it. Similarly, batch files that run terminate and stay resident utilities (TSRs) should not be compiled. The reason for this limitation lies in the DOS memory management structure: if a TSR is executed from a program compiled by BAT2EXEC, the memory used by BAT2EXEC itself will not be made available to the system after it terminates. Programs created by BAT2EXEC behave slightly differently from the batch files from which they were compiled. The .COM file does not echo each line to the screen as does the batch file, for example. Running other batch files does not cause the .COM program to end. Also, pressing Ctrl-Break does not present the message, "Terminate Batch file (y/n)." If Ctrl-Break is pressed and BREAK has been set on, the program simply terminates. The size of the resulting .COM file is somewhat larger than the batch file. Compiling a batch file containing a single REM statement results in a .COM file size of 68 bytes, illustrating the overhead of the setup and terminate routines. Program size increases quickly as routines are added then slows as the loaded routines are reused instead of new ones being added. Certainly, BAT2EXEC is not suitable for use on every batch file. Two and three line batch files are best left in their easy-to-alter and simple-to-understand ASCII format. However, for those batch files that have grown into long complex programs, BAT2EXEC is the answer. @@BATCHMAN BATCHMAN Michael J. Mefford Batch file enhancement utility Version 1.1 ------------------------------------------------------- Purpose ------- BATCHMAN, is designed both to give your batch files significantly more power and to add many of the refinements we all wish DOS provided. You can check the DOS version, available memory, or display type and then branch accordingly. You can create colourful menus that branch on a user keypress. And, among its many other capabilities, BATCHMAN will let you adjust the keyboard typematic rate and tame the grating DOS beep or turn it into a tune. BATCHMAN is actually a collection of 48 batch file enhancement utilities, all rolled into one 6K program. This provides more than convenience: if BATCHMAN's utilities were stored separately, at a minimum one cluster each, they'd take up about 100K of disk space. Format ------ BATCHMAN [command] [arguments] [/R] Entering BATCHMAN without any parameters (or with an invalid parameter) will bring up a multi-screen display that lists all the BATCHMAN commands. The optional arguments are parameters for any given command. If you add the optional /R switch, BATCHMAN will display the EL returned from the command. The Report option will be most helpful when you are designing and debugging your batch files. Be sure to place BATCHMAN in a directory included on the DOS PATH so your batch files can find it. Batchman and ERRORLEVELs ------------------------ The key to BATCHMAN's operation is the ERRORLEVEL code, a number that programs can report to DOS when they terminate and that can be acted upon from a batch file. I'll abbreviate ERRORLEVEL as EL for the remainder of this documentation. An EL can have a value between 0 and 255. Each of the BATCHMAN commands returns information as an EL. An explanation of the syntax of each of the BATCHMAN commands and the ELs they return will be found below. The BATCHMAN commands --------------------- The following conventions are used in the explanations below. The commands are listed first, followed by any parameters they might accept, followed by the EL the command will return. The EL is given in curly brackets to make it clear that it is not part of the command syntax and should not be typed in. For example: CLS [nn] {EL=0} Entered without the optional nn colour argument, the command: BATCHMAN CLS will clear the screen with whatever colour it finds at the current cursor position. This provides the most flexibility when you plan to distribute a BATCHMAN batch file to other systems because it retains the user's custom colour scheme. If you wish to control the CLS colour, just add the colour argument nn, where nn is a decimal or hexadecimal value. Hexadecimal numbers need a suffix of "h" to distinguish them from decimal. Selecting a colour in hex is easier than decimal because each of the 16 possible values for each of the background and foreground colours fits into a single digit: the first digit is background, the second foreground. To clear the screen so that subsequent DOS output will use blue letters on a light gray background, for example, you would enter: BATCHMAN CLS 71h The first number (7) is the background colour, and the second (1) is the foreground colour. To do the same using a decimal number requires a little maths: the background colour is multiplied by 16 and added to the foreground. In the above example, the decimal equivalent would be (7 * 16) + 7 = 113, so the equivalent command in decimal would be: BATCHMAN CLS 113 Like its DOS counterpart, BATCHMAN's CLS also homes the cursor to the top left corner. Unlike the DOS CLS, however, BATCHMAN's will clear the whole screen properly in video modes such as the EGA/VGA 43/50 line modes. CECHO [C] [nn,]string{EL=0} CECHO is similar to the DOS ECHO command except you can choose the colour of the echoed string. The nn colour value is entered in the same manner as with CLS, and again, if you don't enter a colour value, BATCHMAN will use the currently specified colour. To echo a "Zowie!" to the display in an eye-catching blinking yellow on red, you would enter: BATCHMAN CECHO CEh,Zowie! The C (hex) value for the background colour normally displays as orange for a foreground colour. When used as a background colour, however, it displays as the blinking low intensity counterpart, red. Keep in mind that any high intensity colour selected for the background will blink in its corresponding low intensity colour value. The optional C parameter shown in CECHO syntax (don't confuse it with the hex C colour value in the immediately-preceding example) stands for "no carriage returns." Normally, both CECHO and the DOS ECHO move to the next line after echoing a string. At times this is not desirable. For example, you might wish to echo two strings, with different colours, on the same line. With BATCHMAN you can suppress the carriage return by adding a solitary C as the first argument. For example, to display a red on yellow blinking "Zowie!" followed by a normal red on yellow "Batchman!" on the same line your batch file would consist of: ECHO OFF BATCHMAN CECHO C CEh,Zowie! BATCHMAN CECHO 4Eh,Batchman! You can suppress the carriage return to prevent the display from scrolling when you echo to the last line of the display. This feature makes full screen menus feasible, whereas echoing to the last line with the DOS ECHO command causes the screen to scroll, spoiling any previous display layout. SETLOOP [n] {EL=0} . . DECLOOP {EL=SETLOOP-1} You use the SETLOOP and DECLOOP commands when you want to repeat a set of batch file commands. SETLOOP sets a loop counter to the n argument, which can be a decimal number between 0 and 255. Once the counter is set, the BATCHMAN DECLOOP command will decrement the counter each time it is executed and return the new value of the loop counter as an EL. The short batch file: ECHO OFF BATCHMAN SETLOOP 10 :HERE BATCHMAN CECHO ZONK! BATCHMAN DECLOOP IF ERRORLEVEL 1 GOTO HERE will echo "ZONK!" to the display 10 times before terminating. The batch processor will branch to the HERE label as long as EL is 1 or greater. Programmers may wonder where the loop counter is stored while other commands are executing. For the SETLOOP and PUSHPATH commands (PUSHPATH/POPPATH will be discussed below) BATCHMAN creates a small TSR of approximately 500 bytes. The loop counter uses one byte for its storage; the balance is reserved for path strings. When the loop counter becomes zero, the BATCHMAN TSR data area is returned to the system memory pool (unless PUSHPATH is also using the data area). Note that since the loop counter is only one byte, you can not do loop nesting. If you exit a batch file before SETLOOP has decremented to zero, the TSR data area will not be released. You should construct your batch files so that any early exit from a loop will execute a SETLOOP 0 to force a recovery of the TSR data area. BATCHMAN is smart enough not only to find its previous TSR data, but will prevent the creation of another if you try to enter two SETLOOP commands. QFORMAT [d:] [N] {EL=0 if successful; EL=1 if not.} QFORMAT is designed to wipe out all the files and subdirectories on a floppy disk at a single stroke. To keep you from accidentally trashing your hard disk, the command will only accept A: or B: as drive arguments. All other drive requests are ignored, and you can omit the drive argument only if A: or B: is your current default drive. As a further precaution, QFORMAT warns you that all data will be lost and requires that you press Y and Enter to confirm. Any other keypress will abort the process. If you don't want BATCHMAN to pause and ask for your approval, however, you can add the optional N argument to the command. The N stands for No Ask. Use this option with caution! QFORMAT will work only on diskettes that have already been formatted by DOS. The DOS FORMAT command puts vital information about the media type, number of clusters per FAT, and so forth, in the boot sector of the disk. BATCHMAN's QFORMAT command uses this information to find and place zeros in the FAT and root directory sectors of the disk. The reason why QFORMAT can be so fast is that it doesn't have to do the same work as the DOS FORMAT command. FORMAT not only does a low level format but also writes over the entire data area of the disk. It's the low-level-and-data-format process that takes forever. A low level format really needs be done only once, and QFORMAT blithely skips that step. QFORMAT is sophisticated enough to preserve bad sector information, however. PUSHPATH {EL=0 if successful; EL=1 if not} . . POPPATH {EL=0 if successful; EL=1 if not} PUSHPATH saves the current drive and directory, which can then later be restored with POPPATH. Typically, a batch file that executes an application includes a DOS CD command (often a change of drive as well) move operations to the place where the application resides. After the application terminates, it's usually desirable to return to the original path. By way of example, to run Lotus 1-2-3 on drive D: and then return to the default path afterwards, your batch file would look something like this: BATCHMAN PUSHPATH D: CD \123 123 BATCHMAN POPPATH PUSHPATH saves the current path in a TSR data area, just as the SETLOOP command does. While only one byte is reserved for SETLOOP's loop counter, however, BATCHMAN's TSR data area allows stacking up several paths with PUSHPATH. Subsequent POPPATH commands will retrieve the paths in a LIFO (Last In First Out) stack basis. Suppose, for instance, that you're currently in your directory and you issue the following commands: BATCHMAN PUSHPATH CD \DOS BATCHMAN PUSHPATH CD \PCMAG BATCHMAN POPPATH BATCHMAN POPPATH In this sequence, the first POPPATH puts you back into the \DOS subdirectory, and the last POPPATH restores you to the root directory from which you started. The number of path layers that can be stored will vary with the length of each path pushed onto the stack. BATCHMAN's TSR area reserves 408 bytes for paths, which allows for 6 levels of nested paths if each path is the maximum 65 characters allowed by DOS. Shorter path names will allow nesting greater than 6 levels. BATCHMAN returns an EL of 1 if it finds the stack too full for another PUSHPATH or if the stack is already empty with a POPPATH. Otherwise, the EL returned is zero. When the last path is popped off the stack, the TSR data area is discarded and returned to the DOS memory pool. ANSI {EL=0 if ANSI found; EL=1 if not found} This BATCHMAN command is designed simply to determine whether ANSI.SYS is or is not installed. If the EL is 1 you can then branch around any ANSI.SYS escape sequences contained in your batch files. BATCHMAN is smart enough to detect ANSI.SYS, but it will not find other ANSI.SYS emulators, such as DesqView's DV-ANSI. BEEP [m,n[;m,n]...]{EL=0} The BATCHMAN BEEP command gives you a great deal of flexibility in controlling the frequency and length of the sound DOS emits in response to a Ctrl-G character. The m,n beep arguments are decimal numbers and are used in pairs, separated by a comma. The m value represents the frequency (in Hz.), and n is the number of 1/18th second increments that comprise the duration. The command for a middle C beep of a 1/2 second, for example, would be: BATCHMAN BEEP 262,9 By separating the argument pairs with semicolons, you can produce a series of tones with the same BEEP command. You might, for example, find it interesting to try: BATCHMAN BEEP 392,3;523,3;659,3;784,3;10,3;659,3;784,12 The lowest valid frequency is 19, a very low buzzing sound. You can use a value less than 19 to create pauses between tones: no sound will be emitted, but the duration argument is executed, effectively producing a programmable delay between notes. If you omit all arguments, BEEP defaults to 1046,1 -- a C note for 1/18 of a second. The DOS Ctrl-G beep is a frequency of 886 that lasts for one second. Musically, a frequency of 886 is an out-of-tune A, which probably explains why it grates on so many ears. WAITTIL hh:mm[ss] {EL=0 if successful; EL=1 if aborted} WAITTIL provides a convenient way to pause until a certain time of day. The hh:mm:[ss] argument is the time in hours, minutes, and optionally seconds. BATCHMAN will wait until the specified time arrives but you can manually abort the wait by entering any keystroke. A typical application for WAITTIL would be to execute an electronic bulletin board communications program that would automatically download messages late at night when rates are lower. WAITFOR [mm:]ss {EL=0 if successful; EL=1 if aborted} WAITFOR simply pauses for a specified number of minutes (mm) and seconds (ss). You can omit the minute part of the argument if you desire. As with WAITTIL, the WAITFOR delay can be over-ridden by pressing a key. CURSORTYPE [m,n] You can use CURSORTYPE either to create a cursor size that suits your taste or to restore the normal underline cursor after an application alters it. Entering CURSORTYPE without any arguments will default to the standard underline cursor. To create a custom cursor, you supply the m,n arguments as the start and stop line values. These values can be either decimal or hex; for hex input, add an "h" suffix to the number. The top of the character box is logical line zero; successively-numbered lines increment downward. The valid scan line values used for m and n are 0-7 for a CGA, 0-13 for a monochrome or EGA, and 0-15 for a VGA. The default underline cursor start/stop lines are 6,7 for a CGA, 11,12 for a monochrome or EGA, and 13,14 for a VGA. To set an EGA solid block cursor, for example, enter: BATCHMAN CURSORTYPE 0,13 Note that the EGA BIOS on some video boards will attempt to override your selections. BATCHMAN temporarily turns off this BIOS EGA emulation logic for all video boards when the cursor type is set, and this seems to work for most systems. However, if entering CURSORTYPE without arguments does not give you the normal default underline cursor, you can explicitly request an underline cursor that fits your display. You may need to do this for video modes other than the normal 25 line modes. A "wrap around" cursor, in which the stop line has a lesser value than the start line, is supported by the hardware of only some video systems. BREAK {EL=0 if OFF; EL=1 if ON} The BATCHMAN BREAK command returns the current state of DOS's Ctrl-Break checking. You can change the state of BREAK with the DOS command of the same name. DRIVEEXIST d: {EL=1 if exist; EL=0 if not} DIREXIST directory {EL=1 if exist; EL=0 if not} These two BATCHMAN commands are used to return an EL of 1 to your batch files if the specified variable exists. ISVOL [d:]volume {EL=1 if exist; EL=0 if not} Similarly, this command returns an EL of 1 if a particular disk volume exists on the named drive. YEAR {EL=year from 1980 (0-199), where 0=1980} MONTH {EL=(1-12)} DAY {EL=(1-31)} WEEKDAY {EL=(0-6), where Sun=0; Sat=6} HOUR {EL=(0-23)} MINUTE {EL=(0-59)} SECOND {EL=(0-59)} This group of BATCHMAN commands returns the system time and date. Note that you can obtain a relatively fine resolution of the time. VIDEOMODE {EL=(0-19)} The EL returned by the VIDEOMODE command allows you to determine which of the possible screen modes listed in Figure 3 is currently being used by your display. ROWS {EL=display rows} COLS {EL=display columns} These obvious but very handy commands return the current number of rows or columns displayed. SETCURSOR m,n {EL=0} By supplying values for m (the row) and n (the column) you can use SETCURSOR to place your cursor at the specified screen location. By using SETCURSOR in concert with CECHO you can precisely control the location of your messages. For example, to display "Gotham City" in blue in the middle of the screen, you would create the following batch file: ECHO OFF BATCHMAN SETCURSOR 12,35 BATCHMAN CECHO 1,Gotham City Be sure to include the ECHO OFF command, both so that DOS won't spoil your display by echoing the commands, and so that the cursor won't return to the beginning of the next line for the CECHO command. A related use of SETCURSOR is to hide the cursor. You can do this by setting the cursor to display on line 26, which is off screen. Be sure to issue a second SETCURSOR command that puts the cursor back on screen once the hidden cursor is no longer needed, or you won't be able to see what you type! If you forget, don't panic. Just press Esc, blindly type CLS and press Enter, and things will return to normal with the cursor homed to the top of the display. E43V50 {EL=0 if successful; EL=1 if not} This BATCHMAN command loads the 8x8 BIOS font for an EGA or VGA monitor. This changes the number of lines displayed to 43 (EGA) or 50 (VGA}. You can use the DOS MODE command to return to the normal 25-line display. PRTSC {EL=0} This command will execute a printer screen dump exactly as if you had pressed Shift-PrtSc on an 83-key keyboard or the dedicated Print Screen key on a 101-key keyboard. COMPARE string1 string2 {EL=0 if match; EL=1 if no match} The BATCHMAN COMPARE makes a case insensitive comparison between two strings. For most purposes you'll probably want to use COMPARE instead of the case sensitive DOS batch command: IF string1==string2 With the DOS IF string comparison a non-case sensitive match requires two tests -- one for uppercase and one for lowercase. Even this does not guarantee a match if the string is a mixture of upper and lower case, as might occur if a batch file were looking for a person's name, for example. COMPARE solves this case problem. Note that the BATCHMAN COMPARE does not need the double equal signs the DOS IF command uses. CANCOPY filespec [d:] {EL=0 if room to copy; EL=1 if not} Before you copy a file or a number of files to another drive (especially a floppy disk drive), you can use CANCOPY to see if there is enough room for all the specified files. The filespec you supply can use the DOS ? and * wildcards. If you don't specify the target drive, the default drive is checked. Thus, for example, to check whether the collection of PC Magazine utilities you keep in a directory called PCMAG on drive C: will fit onto a floppy, you would enter: BATCHMAN CANCOPY C:\PCMAG\*.* A: BATCHMAN returns an EL of 0 if there is room; otherwise a 1 would be returned. If you enter this from the DOS command line, you'll want to include the /R option to see the EL returned on screen. WARMBOOT COLDBOOT As their names imply, WARMBOOT and COLDBOOT reboot your system. WARMBOOT does the same thing as pressing Ctrl-Alt-Del; COLDBOOT is like hitting the big red switch. A COLDBOOT does a memory check (among other things) that WARMBOOT does not, and it takes a lot more time. Of course, be forewarned that with either of these commands all unsaved data in RAM memory will be lost. Note that WARMBOOT and COLDBOOT may not work on some non-compatible systems. SHIFT ALT | CTRL {EL=1 if depressed; EL=0 if not} This command returns the state of either the Alt or Ctrl key. For example, BATCHMAN CTRL returns an EL of 1 if the Ctrl key is currently depressed. You can use the SHIFT command along with the BATCHMAN GETKEY command without arguments to detect alternate key presses. (See GETKEY, below, for an example.) NUMLOCK [ON | OFF] {EL=0} CAPSLOCK [ON | OFF] {EL=0} SCROLLOCK [ON | OFF] {EL=0} These three self-explanatory commands toggle the current shift state of the NumLock, CapsLock or ScrollLock keys when used without the ON or OFF options. They explicitly turn the three keys on or off if the optional arguments are supplied. Thus, for example: BATCHMAN NUMLOCK will toggle the NumLock state on if it was off or off if it was on. Entering BATCHMAN NUMLOCK OFF will turn the NumLock state off regardless of whether it is currently on or off. This latter would be a useful line in your AUTOEXEC.BAT if you use the numeric keypad for cursor navigation instead of number entry. Note that on some keyboards the LED indicator lights may not faithfully track changes in shift status. RENDIR old new {EL=0 if successful; EL=1 if not} The RENDIR command will rename a directory, but only on systems using DOS 3.0 or later. To use it simply enter the path of the old directory and the new name. For example, to change the name of a temporary directory named TMP on the C: drive to a permanent name, say, ROBIN, you would enter: BATCHMAN RENDIR C:\TMP C:\ROBIN Be sure to include the complete path for both the old and new directory names if the directory is other than the default. ROMDATE {EL=0} ROMDATE displays the eight bytes of the BIOS date at address FFFF:0005 of the ROM BIOS. Usually, the display will be something like 10/07/87, but some clone BIOSs do not have a date. If no ASCII numbers are found, BATCHMAN displays nothing. GETKEY ['string' n] {EL=scan code if no ['string' n] list; else EL=position in list.} There are probably hundreds of versions of the batch file GETKEY program. They return the scan code of the next key you press as an EL. If you enter the BATCHMAN GETKEY command without the optional (bracketed) arguments, it will do the same thing. Entered without arguments, GETKEY can also be used with the BATCHMAN SHIFT command to detect Alt- or Ctrl- key combinations. The scan code for the "Q" key is 16. To check for an Alt-Q keypress (perhaps as a Quit key command), you would use the following batch file: ECHO OFF GETKEY BATCHMAN GETKEY IF NOT ERRORLEVEL 16 GOTO GETKEY BATCHMAN SHIFT ALT IF NOT ERRORLEVEL 1 GOTO GETKEY ECHO Alt-Q was pressed. GETKEY's optional key list provides still another kind of functionality with its optional key list. The information you need may not be the scan code of a given key, but rather its position in a string. If you supply the optional 'string' argument to GETKEY, BATCHMAN will wait either until one of those keys listed has been pressed or until you break out of the command with Ctrl-Break or Ctrl-C. An example may helpful here. With the command: BATCHMAN GETKEY 'yn' BATCHMAN will wait until either the "Y" or the "N" key or one of the break keys mentioned above is detected. All other keypresses are ignored, and if the break-out keys are pressed, the EL returned will be 255. GETKEY is not case sensitive, so if either "Y" or "y" is pressed, the EL will be 1, since the "y" is the first character in the string of valid keypresses. For "N", an EL of 2 will return. The string must be enclosed in a pair either of single or double quotes. If you want the single quote included as a valid keypress, enclose it in double quotes and vice versa for double quotes, as in the following example: BATCHMAN GETKEY '"' You can also include the function keys (even the F11 and F12 keys of the extended keyboard) in the GETKEY list. The function key numbers are listed without quotes, (they are designated by the n in the command syntax above), and may or may not be further identified with a leading "F." Multiple function keys are delimited by either a space, comma or semicolon. To add the F1 and F2 as valid keys to the "yn" string example above, you would enter either: BATCHMAN GETKEY "yn" F1 F2 or just BATCHMAN GETKEY "yn" 1 2 If F1 is now pressed, the returned EL will be 3, since F1 is the third entry in the list. DOSVER {EL=(major*32)+minor} DOSVER returns an EL representation of the DOS version in use. DOS version numbers have two parts, the Major version (the number to the left of the decimal point) and the Minor version (the number to the right). For DOS version 3.10, then, 3 is the major and the 10 is the minor. Since the largest EL number is 255, the DOS version number does not fit conveniently into an EL. For DOS 3.10, for example, if the dot is discarded the remaining 310 is too large for an EL. Of course, BATCHMAN could be content to return only the major number, truncating anything after the dot, or even the first digit after the dot. But that would be less than sufficient for some applications. So instead, the DOSVER command compresses the version number by multiplying the major number by 32 and adding it to the minor number. With DOS 3.30 the result will be (3*32)+ 30=126; with DOS 4.00 it would be 128. If there had been a DOS version 3.32 we would have a problem of course, since this would also return 128. Historically speaking however, we are safe here. MAINMEM n | R {EL=0 if enough} EXPMEM n | R {EL=0 if enough} EXTMEM n | R {EL=0 if enough} The arguments for these three memory commands can be either a decimal number, n, or an R. The decimal argument is used to check whether the desired amount of memory (in KB) is free. If BATCHMAN finds that there is enough free memory to meet the request, the EL will be 0. Thus, if an application needs 512K bytes of the 640K maximum possible with DOS, you would enter: BATCHMAN MAINMEM 512 The EL will return 0 if there are at least 512K bytes free; otherwise, a 1. Your batch file can then branch to an error message if there is not enough memory to run the application. Note that these memory commands do not allocate the memory. They only check if it is free. The alternative R argument stands for Report and will display the current free memory of the type requested on the screen. To see how much free expanded memory you have, for example, enter: BATCHMAN EXPMEM R The report option of the three types of memory will go nicely with BATCHMAN's ROMDATE command in a system information batch file. DISPLAY {EL=display type} The DISPLAY command will report on the type of display your system has installed. The values returned by DISPLAY as EL codes are: 1=MDA 2=CGA 4=EGA colour 5=EGA mono 6=PGS 7=VGA mono 8=VGA colour 11=MCGA mono 12=MCGA colour CPU {EL=CPU type} Similarly, the CPU command returns an EL that indicates the microprocessor used by your machine. The specific EL numbers are: 1=8086/8088; 2=80186; 3=80286; and 4=80386. WINDOW m,n,w,h[,c,b] {EL=0 if successful; EL=1 if not} The powerful WINDOW command displays screen boxes. It provides several parameters and options. The first two decimal numbers (m,n) are the row and column of the top left hand corner of the window. The next two decimal numbers (w,h) are the desired width and height of the window (including the border characters.) The smallest size that WINDOW allows is 2 characters in width and height. The optional fifth parameter, c, can be either a hexadecimal or decimal number for the colour of the window. If no colour argument is supplied, the current colour of the screen is used by default. The last parameter, b, sets the type of border used to surround the window. If no parameter is found, spaces are used. If you enter a minus sign for b, a single-line box character will be drawn. An equals sign for b will produce a the double-line box character. In all cases, the centre of the window is cleared with spaces of the chosen colour. For example, the command BATCHMAN WINDOW 1,1,80,25,17h,= will create a blue window with white double line box characters that will fill the entire screen, making a nice menu frame. Text could then be added with the BATCHMAN SETCURSOR and CECHO commands. TYPEMATIC [m,n | N] {EL=0 if valid parameters; EL=1 if not} m=typematic rate (0 - 31); larger m=faster rate n=initial delay (0 - 3); larger n=longer delay N=normal: m=20; n=1; default: m=25; n=0 TYPEMATIC works only with keyboards that support adjustable typematic (automatic key repeating) rates at the BIOS level. That includes most machines, starting with the AT, but not all clones. The first optional decimal parameter, m, is a number between 0 and 31 and represents the desired typematic rate. The larger the m value, the faster your keyboard will repeat keystrokes. The second parameter, n, has a range of 0-3, and sets the initial delay. This delay is the length of time you must hold down a key before it begins repeating. The larger the delay value the longer the delay. The delay parameters are in increments of 1/4 second, with 0=1/4 and 3=1 second. The typematic parameters are divisors and cannot be easily be translated into fractions of a second, however, and so should be thought of only as a gradient scale. If you don't enter any parameters, TYPEMATIC defaults to a repeat rate of 25 and a delay of 0. The 25 translates into about 17 characters per second with an initial delay of 1/4 second. You can restore the typematic rate to the normal hardware defaults (11 characters per second with a 1/2 second delay) by using the N parameter. Just enter: BATCHMAN TYPEMATIC N and the normal values of 20, 1 will be used. Once you try adding a little zoom to your keyboard, however, you probably won't ever go back to the hardware defaults. Updates ------- This updated version of BATCHMAN has enhancements to the GetKey and Shift functions. The Getkey function has been enhanced with respect to the command line arguments. In this version, unquoted numeric arguments represent scan codes instead of function keys. Any scan code is valid; thus, one can now check for Home, PgDn, or Tab as well as function keys. A drawback is that one must know the scan code for the desired key, including the twelve function keys. However, the previous mode of operation is still supported if one precedes the function key with an "f" (case-independent). The "f" is no longer optional. Finally, function key 0 has been defined as the "Enter" key. The Shift function now reports whether either of the shift keys is depressed. Use BATCHMAN SHIFT SHIFT. BATCHMAN returns Errorlevel 1 if either shift key is down; otherwise errorlevel 0. @@BLOAD & BSAVE BLOAD and BSAVE Save and reload the screen display Version 1.0 ------------------------------------------------------- Purpose ------- Similar to the BASIC commands of the same name, these two programs provide a simple ability to save and reload screen displays. They are included here for use with the DRAW program. Format ------ BSAVE filename then BLOAD filename Remarks ------- BSAVE stores the currently displayed screen in a file. The BLOAD command can then be used to reload it. If the screen is a graphic image, you should use the VIDMODE command included on Power Pack volume 3 to set the appropriate display mode before using BLOAD. BLOAD and BSAVE can be used in batch files to quickly display complete screens or drawings. See the DRAW command for more information. @@CALC CALC Douglas Boling Pop-up programmer's calculator Version 1.0 ------------------------------------------------------- Purpose ------- A pop-up programmer's calculator with base conversion, bit-shifting, logical operator, and mod functions, and 32-bit number representation that also supports a 2-decimal fixed-place arithmetic calculations. Format ------ CALC Remarks ------- CALC is a terminate-stay-resident (TSR) program that can be loaded either at the DOS command line or as a part of an AUTOEXEC.BAT file. The Alt-S key combination (default) pops up a 6-line window for calculations; the Esc key restores the screen to its previous condition. The program automatically adapts itself to Monochrome, CGA, EGA or VGA displays. Any number on CALC's entry line can be successively converted to hexadecimal, binary, octal, or decimal (default) notation by pressing F1. Mixed-base calculations are supported, and the +, -, *, and / function conventionally so long as it is realised that CALC operates in integer, not floating point mode. (Fixed 2-decimal place calculations can be made by pressing F2 before entering the numbers.) In integer mode the mod function (e.g. 25 mod 8 = 1) is also supported, using either the % or the \ sign as the operator. CALC uses full 32-bit number representation, and so can be used for address calculations. The function keys F3, F4, and F5, perform logical and, or, xor operations between two numbers. F6 performs a not (invert) function on the number entered. F7 shifts bits left and F8 shifts right. F9 is a change-sign key, and F10 clears the entry line. To clear the calculator field, press Shift-F10. Using the values for SS and MM shown in the Scan Code and Shift Mask charts given in the Tech Notes document, the default hotkey for CALC can be changed with DEBUG, as shown below: DEBUG CALC.COM E 157 "Ctl-A" ;The new letter E 26B SS ;Scan code E 275 MM ;Shift mask W Q @@CARDFILE CARDFILE Jeff Prosise Pop-up contacts cardfile with autodialler Version 1.1 ------------------------------------------------------- Purpose ------- Combines a database of names, addresses, phone numbers, and memo-IDs with a Hayes compatible autodialler. Format ------ CARDFILE [d:][filespec] Remarks ------- CARDFILE is normally loaded with a specific database (filespec) by being listed as a line in your AUTOEXEC.BAT file. You can switch to another database by repeating the command with a different filespec at the DOS prompt. The Alt-Right Shift key combination pops up the CARDFILE window, and Esc returns you to your application. Within the window, the Function keys are assigned thus: F1 - Begin/save a new or edited card F2 - Edit the card currently displayed F3 - Delete the card currently displayed F4 - Search all cards for a text string F5 - Save datafile to disk F6 - Dial the phone number currently displayed All card data entry and editing is done in overstrike mode. The backspace key deletes the previous character and the four cursor keys can position the cursor anywhere in the record area. Enter moves the cursor to the start of the next line. You can page through all of the cards with the PgUp, PgDn, and Enter keys. The HOME and END keys let you jump quickly to the first or last card, respectively. To search the database, press F4 and enter a text string. Pressing Enter resumes the search (which is not case-sensitive) after a match; Esc cancels the search. An alternate way to find a name quickly is to press Alt and a letter key. To find "Smith," for example, hit Alt-S, then use PgDn or Enter to skip past "Sagamore" and "Siddhartha." When used with a Hayes-compatible modem, F6 dials the number currently displayed. At the prompt, pick up the phone and press the Spacebar to break the modem connection. The CARDFILE autodialler ignores all non-numeric characters except the comma, which inserts the pause sometimes needed to access an outside line. Because CARDFILE is a memory-resident program, it must assume rather than change the modem parameters. By default, CARDFILE is initially configured for a 1200-baud modem connected to the COM1. Using DEBUG you can change the value at :0182 from 0 to 1 to change from COM1 to COM2, to 2 for COM3, etc. Similarly, to change to a different baud (bps) rate, change the value at :0184h from the default 83h, as follows: 300 baud 43h 1200 baud 83h 2400 baud A3h 4800 baud C3h 9600 baud E3h The "ATDT" (dial) and "ATH0" (hangup) strings are at addresses :0185h and :018Ah, respectively. While they can be changed (especially substituting a "P", ASCII 80 for the "T" in the dialling command), note that each sequence must be 4 bytes long. The dial string must be delimited by a zero byte, and the hangup string must end with 0Dh and 00. To save memory, the card capacity may be lowered from the default 255 (FFh) at :0169. Each record takes 192 bytes. And if the Alt-Right Shift 'hotkey' conflicts with other software, change the default value 09 at address :036A to a combination of the following: Right-Shift 1 Left-Shift 2 Ctrl 4 Alt 8 Note ---- While CARDFILE will operate under DOS 2.x, its critical error handler is only fully effective with DOS 3.x. @@CDX CDX Michael Holmes and Bob Flanders Enhanced change directory command Version 1.3 ------------------------------------------------------- Purpose ------- Provides an alternative to the DOS CD command that eliminates the need to enter long path and directory names and that finds and changes to directories containing specified filenames. Format ------ CDX [/?] [/B] [/+] [/F filename] [d:]p1 p2 ..pn Remarks ------- Entered without any of the optional / switches, CDX searches one or more hard drives d: for a specified directory p1. If found, the full path is displayed with a ? prompt and is selected by typing Y; typing N continues the search for another qualifying directory. If the d: parameter is omitted, only the current drive is checked; *: searches all hard drives, starting with the first hard drive in the system. Multiple drives listed as d:, including floppies (if requested) are searched in named order, e.g. DCAB:. If d: is preceded by a minus sign (-) the drive(s) listed are excluded rather than included. The p1 target directory name can be truncated to as little as its initial letter. To prevent having to bypass an inconvenient number of qualifying directories at the ? prompt, multiple values of p, each separated by a space, can be used to construct an abbreviated path, which need not include all steps. If the initial p1 begins with a backslash (\) the search will be made from the root rather than the current directory. Using the /F switch limits qualifying directories to those containing a user-specified filename. The filename supports the * and ? DOS wildcards, and if all the subdirectories of d: are to be searched, p1 may be omitted or replaced by an asterisk (*). Supplying the /B switch automatically selects the first qualifying directory, eliminating the user prompt. The /+ switch causes floppy disk drives A: and B: to be included in the search. Executing CDX with no operands brings up a syntax help screen. In keeping with DOS conventions, entering CDX with a single dot, double dot, backslash or a single parameter that is the full name of a directory goes to the requested directory. An extension of this convention allows a disk name to be specified. For example, if you are currently on C: and you enter CDX D:\ABC you will be taken to the D: drive ABC directory. CDX can be forced to search by placing a * at the end of the parameter. @@CHANGE CHANGE Michael J. Mefford Fast text search-and-replace Version 1.0 ------------------------------------------------------- Purpose ------- Performs a rapid search-and-replace operation for text strings and/or ASCII decimal codes throughout a file of maximum 40,000-byte length. Format ------ CHANGE filespec findstring replacestring Remarks ------- The filespec parameter may include a drive letter and a path in addition to the designated filename. Findstring and replacestring may consist of text characters enclosed within (double) quote marks or ASCII decimal codes whose numbers are separated by commas. Note that the format requires that each parameter be separated by a single space. Text strings in quotes and ASCII values in numerals may be combined in either string if separated by commas. Example -------- To change all references to Miss Jones to Mrs Smith in the file NOGOSSIP.ART on the current directory, you would enter CHANGE NOGOSSIP.ART "Miss Jones" "Mrs Smith" Example -------- To strip out all carriage return-line feeds (i.e. replace them with a null string) in the file MCI.B16 in the \COMM subdirectory, enter CHANGE \COMM\MCI.B16 13,10 "" Notes ----- 1. In the second example you might want to use a space between the quote marks rather than a null string to keep the words from running together. Observe that by putting the number of the month in hexadecimal (B=November) you can fit both month and day within the three character DOS filename extension. @@COMPUTE COMPUTE Michael J. Mefford Command line calculator Version 1.0 ------------------------------------------------------- Purpose ------- A five-function calculator (addition, subtraction, multiplication, division, and modulo functions) that works directly from the DOS command line prompt. Format ------ COMPUTE arithmetic expression Remarks ------- COMPUTE accepts decimal numbers only, and the operators in its arithmetic expression are +, -, *, /, and %. Note that the % symbol does not stand for percent, but rather designates the modulo operator, which returns the remainder of an integer division. (Example: COMPUTE 8 % 5 returns the value 3, since 5 goes into 8 once with a remainder of 3.) When working on real numbers with a fractional part the modulo operator in COMPUTE rounds off the operands before the division. The standard order of precedence for arithmetic operations is followed by default. Multiple levels of parentheses and/or square brackets are supported, however, so that the order in which calculations are made can be modified. Thus, while COMPUTE 4 + 5 * 2 returns the value 14, the command COMPUTE (4 + 5) * 2 returns 18. COMPUTE stores its last calculated result within its own .COM file. This number, designated x, can be recovered and used in the next calculation, whose result becomes the new x. The value of the currently-stored x can be seen by entering the command COMPUTE x, and x can be used as an operand, as in COMPUTE x + 5. The program can handle decimal numbers up to 20 digits on either side of the decimal point. Rounding errors are precluded by using a binary coded decimal (BCD) format. Under DOS 3.x and later, COMPUTE can be renamed to a shorter name to save keystrokes. Under DOS 2.x, however, the program cannot be renamed and must be stored either in the current directory or in one designated in a PATH= statement. @@CONVERT CONVERT Michael J. Mefford Convert between hex, decimal, octal and binary Version 1.1 ------------------------------------------------------- Purpose ------- Simultaneously displays an ASCII code or whole number between 0 and 65,535 in its hexadecimal, decimal, octal, and binary equivalents; especially useful in translating printer, modem, or display escape sequences and set-up strings from one number base to another. Format ------ CONVERT number[-number][base] | "character(s)" Remarks ------- Either a single number or a number-number range may be input to CONVERT for multiple number base display. Decimal input is assumed, unless otherwise indicated by adding b (binary), o (octal), or h (hexadecimal) to the number(s). An ASCII code to be converted must be placed within double quotes. Control codes (for example, Ctrl-A) may be entered normally at the keyboard (within double quotes), with the exception of the escape character. To display the equivalents (including the ASCII left-arrow graphic) of the escape character, enter CONVERT 27. When large numbers are converted, the 2-byte sequence displayed within quotes in the right-hand column as the ASCII "equivalent" should not be used in translating set-up strings. It represents the individual byte values, not the value of the combination. Note, too, that in this display, decimal 0 (null), 32 (space), and 255 (blank) all appear as blanks. The output from CONVERT may be redirected to a printer or to file, so a multi-line table of values can be created. When redirection is used, however, the ASCII equivalent normally shown in the right-hand column is dropped. @@DOSCLIP DOSCLIP Douglas Boling Cut-and-paste clipboard for DOS Version 1.0 ------------------------------------------------------- DOSCLIP is a memory-resident (TSR) utility that provides a Windows-like cut-and-paste facility for DOS programs. You can simply pop-up DOSCLIP over one program, copy a block of the text on-screen to the DOSCLIP clipboard, change to another program and then 'paste' the copied data into it. Unlike other cut-and-paste programs, DOSCLIP is Windows aware and will operate in conjunction with the Windows clipboard. This makes it especially useful for those who run DOS applications under Windows in 386 Enhanced mode. Format ------ DOSCLIP [/B] [/U] (loads DOSCLIP) Alt-C (pop-up DOSCLIP) Arrow keys and Shift (select area) C or Enter (copy selected area) V (paste clipboard) Remarks ------- DOSCLIP is loaded from the DOS prompt and requires 10K when memory resident. The optional /B switch parameter is required only with video boards that do not conform to the IBM video standard. Entering DOSCLIP with the /U switch uninstalls the program (subject to the usual TSR limitations... TSRs must always be uninstalled in the reverse order). The default pop-up hotkey is Alt-C, which brings up DOSCLIP over the application and replaces the underline cursor with a block-style cursor used to define an on-screen text area to be saved to the clipboard. The arrow keys, PgUp and PgDn, Home, and End are used to move the DOSCLIP cursor; Ctrl-Left Arrow and Ctrl-Right Arrow move it laterally in eight -character jumps. To block an area, place the cursor in one corner and move it to the diagonally opposite corner while holding down the Shift key. After releasing the Shift key, the defined area is saved to the clipboard by pressing Enter or the C key. A defined text area can be pasted into another application by pressing Alt-V or by bringing up DOSCLIP with Alt-C and then pressing V. The default pop-up and paste hotkeys can be changed by using PATCH.COM and the DOSCLIP.ZIF file, both of which are supplied (see below). When used in conjunction with Windows, it is desirable to load DOSCLIP before starting Windows, memory permitting. This will make DOSCLIP available to all Windows sessions. Windows should also be run in 386 Enhanced mode if possible so that data captured in DOSCLIP can be pasted into Windows applications and vice versa. Customising DOSCLIP with PATCH.COM ---------------------------------- PATCH.COM is a special customising program for PC Magazine utilities, allowing you to alter colour settings, hotkeys and other defaults directly in a .COM file without having to use DEBUG. PATCH.COM works via a .ZIF type file with the same name as the utility it is to alter... the .ZIF file tells PATCH.COM what customisation options are available for a particular program and how to make the changes. PATCH.COM is included on this disk along with DOSCLIP.ZIF so that you can set the colours and hotkeys for DOSCLIP if necessary. To use PATCH.COM: * Make sure PATCH.COM, DOSCLIP.COM and DOSCLIP.ZIF are all in the same directory and that this is your current directory (use CD if not). * Enter a command such as COPY DOSCLIP.COM DOSCLIP2.COM to make a back-up copy of DOSCLIP.COM. You probably won't need this but it means that you have an original DOSCLIP.COM to come back to if you do. * Enter PATCH to start PATCH.COM. As only one .ZIF file is present, the menu on the left will just list 'DOSCLIP'. Press Enter to select this and the customisation items on the right will highlight. * Use the arrow and return keys to select the hotkey, colours and buffer settings for DOSCLIP as you prefer. * Press the Esc key when you've finished your changes and type a Y if you want to save them to DOSCLIP.COM. * Your new settings should now be stored in DOSCLIP.COM and will take affect when you next load it. @@DRAW DRAW Michael J. Mefford Draws graphics from DOS prompt or batch files Version 1.0 ------------------------------------------------------- Purpose ------- Provides low-resolution (320 x 200) colour or high- resolution (640 x 200) monochrome drawing capabilities on CGA, EGA and VGA systems, without the need to work in BASIC. Format ------ DRAW [/K] (Option I) DRAW string [/K] (Option II) DRAW filespec/F [/K] (Option III) Remarks ------- Entered at the DOS prompt with no arguments on the command line (Option I), DRAW looks in the current directory for a file named DRAW.DAT and executes the commands in that file. A sample DRAW.DAT file is included on this disk. The file can be examined, and similar files created, with a regular ASCII word processor. Alternatively, DRAW can be entered with a string of commands (Option II) for a simple graphic or with the name of a file consisting of commands (Option III). Any legal DOS filename may be used, and full path support is provided, but a /F terminator must be appended to the filename. An optional /K may be added to prevent a keystroke from halting execution. Example ------- You can get a feel for how DRAW operates by entering, at the DOS prompt: DRAW X0 C2 BU50 M+40,70 L80 M+40,-70 BD5 P2,2 This will create a red triangle in the middle of your screen. You can trace the specific steps in this command sequence by referring to The DRAW Command Set table below. The DRAW Command Set -------------------- Xn Change to low resolution 320X200 colour graphics. If X is not found, the default is 640X200 high resolution black and white graphics. X must be the first character of the command line or the first character in a file. The palette will be changed to n, where n can be either zero or one. See C colour command below for the colour of each palette. K Do not poll the keyboard while drawing. If K is not found, any keystroke terminates the program. Sn Flood the screen colour to pattern n. n must be a decimal number in the range 0-255, and represents an eight bit pattern. Normally this command is issued immediately after the X command (if present), to clear the screen with a background colour other than black. For example, to clear to colour red (2) in low resolution, the command is S170 (binary 10101010). colour 320X200 640X200 0 0 0 1 85 255 2 170 NA 3 255 NA Pattern colours may also be used. For example, a pattern of half green and half black would be S58 (binary 01000100). In high resolution, each bit represents a dot, eight dots per byte. This is why only two colours (black or white) are available. In low resolution, there are two bits per dot, so four combinations can be represented. In the example here the sequence is 01 (green), 00 (black), 01 (green), 00 (black). See C (colour) command below for complete coding of the colours. U,D,L,R,E,F,G,H These commands, followed by a number, will move in one of the following compass directions: U H | E \ | / \ | / \ | / L -- -- -- + -- -- -- R / | \ / | \ / | \ G | F D Mx,y Move x,y units either relative to the current position or to the absolute coordinates, x,y. If the x coordinate is prefaced with either a plus sign or minus sign, the move is relative. Otherwise, the move is absolute. Note, you do not need to include a plus sign in front of the y coordinate in a positive y move. Pp,b Paint the colour p until the border colour b is found. The paint originates from the current position. B Blank move. The move following a B will move the desired units without plotting points. The next command will then continue drawing. N No update. The draw command following an N command will plot points, but the position will not be updated. The next draw command will start at the same position as the last. Cn Change the colour to n. All draws after a C command will be in colour n. n can be 0 (black) or 1 (white) in high resolution and 0 to 3 in low resolution. In low resolution, the colour is dependent on the palette. 320x200 640x200 colour palette 0 palette 1 0 black black black 1 green cyan white 2 red magenta NA 3 yellow white NA Related programs ---------------- These disks also include BLOAD, BSAVE, VIDMODE and PLAY programs which can be used with DRAW to create quite sophisticated presentations within batch files. The command BSAVE filespec saves a byte image of the screen buffer to a file (with optional drive and path specifications), and BLOAD filespec loads a saved image file back to the screen buffer. VIDMODE can be used in a batch file with BLOAD to set the appropriate display resolution (VIDMODE 4 for low res, VIDMODE 6 for high res). The PLAY utility plays a tune on the PC's speaker. Example ------- This disk includes the example DRAW and PLAY files MOVIE.DAT and STING.DAT so that you can try the this example. Create the following batch file, SAVE.BAT, using an ASCII word processor, EDLIN, or COPY CON: ECHO OFF DRAW MOVIE.DAT/F BSAVE PICTURE Enter SAVE and the batch file will create a saved screen image called PICTURE of the MOVIE.DAT drawing. Now, similarly create a second batch file, SHOW.BAT: ECHO OFF (turn off command display) VIDMODE 4 (select low res graphics) BLOAD PICTURE (load the image) PLAY STING.DAT/F (play the tune) PAUSE > NUL (wait for a keypress) VIDMODE 3 (back to text screen) If you now enter SHOW at the DOS prompt the picture of two con men will appear, with appropriate musical background. Pressing any keystroke will clear the display. Note ---- 1. The PAUSE > NUL line in SHOW.BAT waits for a keystroke without showing a message on the display. This will not work properly on DOS versions prior to DOS 3. 2. The VIDMODE program is included on volume 3 of the Power Pack; you will need to copy the program file to the same directory as the DRAW and PLAY programs for the examples above. @@FREEZE FREEZE Jeff Prosise Locks a running PC to keep sensitive data hidden Version 1.0 ------------------------------------------------------- Purpose ------- Ensures confidentiality of in-memory data when it is necessary to leave a PC running without storing the data to a removable medium or encrypting it. FREEZE temporarily suspends program operation, blanks the screen, and disables the Ctrl-Alt-Del reboot sequence until a user-entered password (up to 64 characters) is re-entered. Format ------ FREEZE Remarks ------- FREEZE is a memory-resident utility, normally loaded by an AUTOEXEC.BAT file. After loading, the machine is "locked" by pressing Alt-NumLock and then entering your chosen password. The password may include any characters except Esc and Enter. Pressing the Esc key aborts password entry, and pressing Enter initiates the lockdown. The Backspace key may be used to correct incidental mistakes, but care must be exercised, as the characters are not echoed on the screen during entry. To unlock the machine, simply re-enter the same password and press Enter. Again, the Backspace and Esc keys can be used to correct or abort password entry. Notes ----- 1. The password is never stored and may be changed each time FREEZE is invoked with Alt-Numlock. If an attempt is made to load FREEZE more than once, an error message will result. 2. While FREEZE is believed compatible with most other memory-resident programs, because of the importance of data with which it is expected to be used, it should be thoroughly checked in your specific configuration. In particular, FREEZE should be loaded before SideKick. @@HC HUGECALC Neil Rubenking Long precision calculator Version 1.0 ------------------------------------------------------- Purpose ------- A command-line calculator utility that can perform addition, subtraction, multiplication, division, exponentiation, and factorial functions on numbers with up to 254 significant digits. Format ------ HC n operator [n] Remarks ------- The n operand variables may consist of any string of digits up to the 127-character maximum of the DOS command line. The operands must not include commas or other formatting punctuation, and must be separated from the command and the operator by at least one space. Two operands are required for all operations except factorial. The operators recognised are +, -, *, /, ^, and !. When output to the screen (the default) or redirected to a printer or other DOS device, HUGECALC prints the name of the function and inserts commas at every three digits in the numeric result. If the output is redirected to a file or piped to a program input, however, only the numeric result is sent. Note that when it accepts input from a file or via a pipe, HUGECALC uses that input as its first operand. This means that you can evaluate complex expressions with HUGECALC by using the DOS pipe (|) facility to string together several HC commands in sequence. Example ------- If a program that prints 10,000 permutations a second is asked to print all possible combinations of 13 characters, how long will it take? The command HC 13 ! | HC / 10000 | HC / 3600 | HC / 24 pipes the factorial of 13 (the possible combinations) to a second instance of HC, which divides it by 10,000 (the permutations per second). The result is piped to a third instance of HC, which divides it by 3600 (the seconds in an hour), and finally to a fourth instance of HC, which divides it by 24 (the hours in a day). The answer printed on the screen is: QUOTIENT: 7 REMAINDER: 4, that is, 7 days, 4 hours. Note that all such chained calculations must be strictly sequential and that parenthetical expressions are not supported. @@INSTALL & REMOVE INSTALL & REMOVE Jeff Prosise TSR management programs Version 1.0 ------------------------------------------------------- Purpose ------- INSTALL and REMOVE are a pair of programs that allow you to load and unload TSR (memory-resident) type programs in a safe way, even with programs that do not provide their own uninstall or unload feature. INSTALL is used before loading a memory-resident program. Subsequently REMOVE will remove the program and restore the PC's interrupt vectors and memory allocation to the same state as before the program was loaded. Using these programs, you can have the TSR programs you need loaded only when you need them and maximise your free memory in situations when you don't. INSTALL and REMOVE can be used to manager one program, a group of programs or even several sets of programs that can be removed or reloaded in stages. Format ------ INSTALL [groupname] and, subsequently, REMOVE Remarks ------- The optional groupname parameter may be the actual name of a TSR utility (or several such names, up to 119 characters) or it may be any convenient name for a group of such programs. All memory-resident programs loaded after invoking INSTALL will treated by REMOVE as a group until INSTALL is run a second time. To be able to REMOVE such utilities individually, run INSTALL just before each separate utility is loaded. Example ------- An AUTOEXEC.BAT file might contain the following lines: INSTALL TIMEKEY TIMEKEY INSTALL FREEZE FREEZE INSTALL SUPERKEY SIDEKICK KEY SK After booting up, entering REMOVE at the DOS prompt would then produce the following display: Number of installations: 3 TIMEKEY FREEZE SUPERKEY SIDEKICK Press ENTER to remove, ESC to abort Pressing Enter would remove Superkey and SideKick. Subsequent calls to REMOVE would be needed to eliminate first FREEZE and then TIMEKEY. Note that TSRs must always be removed in reverse order of loading. INSTALL uses 1600 bytes of memory each time it is invoked. A maximum of 32 TSR groups can be INSTALLed. In the unlikely event that a "Deinstallation failed" warning appears, you should reboot as a memory allocation error may have occurred. @@JOURNAL JOURNAL Michael J. Mefford Expense account manager Version 1.0 ------------------------------------------------------- Purpose ------- A standalone or TSR (23KB RAM) utility that maintains and prints expense account information and includes the appointment schedule features of SCHEDULE (also on this disk). Format ------ JOURNAL [/I] [/U] [/Hn] [/Pn...n] [/G] [/A] [/C] [/M] [/B] Remarks ------- The optional /I switch is used when it is desired to run JOURNAL as a pop-up. The /U switch uninstalls the program if no other TSR has been loaded subsequently. Note, however, that 'SideKick', if used, must be loaded after JOURNAL. The default hotkey is Alt-J, but this can be changed with the /H switch, using any Ctrl- or Alt- alphanumeric key for n. To install with Ctrl-K as the pop-up key, enter . The /Pn...n switch allows entering printer control codes, with up to 10 decimal values for n. For printers that support the IBM extended-ASCII character set, using the /G switch produces a neater printout by utilizing the line-drawing characters. With LCD screens the /B (black-and-white) switch is recommended. By default, JOURNAL chimes and pops up at the time of a scheduled appointment; it also pops up at midnight to turn to the next day's events. The /C switch eliminates the chime; /A prevents the appointment pop-up, and should be used if a communications program is running; and /M prevents the midnight pop-up (to avoid stopping a program that is running overnight). JOURNAL comes up initially with a Calendar screen and can be switched to its Journal and then to its Appointment screens with F7. Pressing the hotkey exits from any screen; Esc goes back to the Calendar screen, where a second Esc exits. JOURNAL should be run from its own directory, which must be current (not just on the path) when it is installed or executed. The program will create and store SCHEDULE.DAT and JOURNAL.DAT in this directory when the Save command (F2) is given from the Appointment or from the Journal screen. The purge command (F4) can be executed from either screen to keep the .DAT files timely. The material removed can be archived, by being automatically appended to the files SCHEDULE.ASC and JOURNAL.ASC. The .ASC files can be edited with a word processor; the .DAT files can only be edited in the program's screens and then resaved. (F2) The PgUp and PgDn keys change the day displayed in the Journal, Appointment, and Purge screens (the month in the Calendar screen). Ctrl-PgUp and Ctrl-PgDn similarly change the months (years). The current date can be restored immediately by pressing F3. Tab and Shift-Tab move among the three sections of the Appointment screen (the two time columns and the mini notepad), and from field to field of the expense Journal screen. Pressing Home moves to the start of an expense field, an appointment section row, or the start of the week in the Journal, Appointment, and Calendar Screens, respectively. Hitting Home a second time moves to the first field, the top of the section, or the first of the month for the three screens, in order. Pressing the End key once and twice moves to the corresponding end points of the three screens. The cursor keys, Del and Backspace keys work as usual. F6, Shift-F6, and Ctrl-F6 clear lines and fields in the Journal screen, and lines, sections, and all sections in the Appointment screen. The Calendar screen displays blocks that correspond to entries in the Appointment Screen. Pressing F5 from the Appointment screen prints a list of appointments when the printer port number (1 or 2) is entered. When F5 is pressed from the Journal screen the program tallies all entered expenses for days up to, but not including the current date. (Use PgDn to advance the day to include the current date). To get an overall total, suitable for deciding whether to file a report yet, press F7. Pressing F8 after F5 will send a full, day-by-day report to the printer (F7) or to an ASCII-editable file (F8). The printed report puts two days on a standard-size page. Remember to purge expense account information when a report has been made or it will reappear on the next report. JOURNAL is a text-based program and will not pop up over graphics screens (e.g. Microsoft Windows) or during DOS or disk activity. The largest number the program can handle is 65,535.99. @@LOCK & UNLOCK LOCK and UNLOCK Steven Holzner File encryption and decryption Version 1.0 ------------------------------------------------------- Purpose ------- LOCK encrypts a file, rendering it unreadable to anyone who does not know the user-chosen passphrase. Subsequently, using the same passphrase, UNLOCK will decrypt the file. Format ------ LOCK plainFile codeFile (to lock a file) then UNLOCK codeFile plainFile (to unlock a file) Remarks ------- The user-selected passphrase can be up to 64 characters in length; the programs prompt you to supply it. Files to be LOCKed and UNLOCKed must be less than 62K in length. If you do not supply new filenames for the locked and unlocked files, the programs use the default filename FILE.LOC. Example ------- You have a file of student course evaluations named CONFY on drive C: that you wish to mail to a colleague in encrypted form. You put a formatted floppy disk in drive A:, and at the C> prompt you enter LOCK CONFY A:CRIMSON When the program asks for a passphrase, you enter VERITAS. The CRIMSON file on the disk will be unreadable. When your colleague--who must, of course, be told the passphrase you have used--puts the disk in his machine, he types UNLOCK A:CRIMSON GUIDE When prompted, he supplies the passphrase VERITAS, and his file GUIDE will be identical to your original file CONFY. Notes ----- 1. LOCK and UNLOCK do not delete any files, original or encoded. 2. You should always LOCK and UNLOCK from one filename to another. If you give the same filename for both the plain and encrypted files in a LOCK or UNLOCK command, you may not be able to recover your plain text. 3. Requires DOS version 2.0 or later. @@NO NO Charles Petzold Exclude files from wildcard operations Version 1.0 ------------------------------------------------------- Purpose ------- Excludes specified files in a subdirectory from the action of a command. Format ------ NO filespec command [parameter] Remarks ------- NO.COM is designed for situations in which you want to apply a command such as DELete or COPY to all the files in a directory except one or two (or a class of) files. For example, NO *.BAS COPY *.* A: copies all the files in your current subdirectory to drive A: except for those that have a .BAS extension. To exclude more than one file (or category) you must use a separate NO command for each on the command line. Thus, NO *.ASM NO *.COM DEL *.* deletes all files in the current directory except those with .ASM or .COM extensions. Notes ----- 1. NO.COM should not be used in conjunction with the PC-DOS BACKUP and RESTORE commands. This is because NO operates by temporarily setting the "hidden" file attribute bit on the files to be excluded from the main command, then unhiding the files after the main command has been executed. Since the DOS BACKUP/RESTORE operation acts on hidden and unhidden files alike, NO.COM cannot be used to exclude files from BACKUP/RESTORE. RESTORE, indeed, will restore the supposedly excluded files as hidden, overwriting the originals. 2. While NO.COM provides full path support (and so requires the use of DOS 2.0 or later), it is a good policy when using NO to use CHDIR to make the directory that contains the files on which you wish to operate the current directory. For example, suppose you are in your root directory, one of whose subdirec- tories is \BASIC. If you were to enter the command NO *.BAS DEL \BASIC\*.* you would not delete all the files in the \BASIC subdirectory except those with a .BAS extension, as you might have intended to do. To do this from the root directory you would have had to enter NO \BASIC\*.BAS DEL \BASIC\*.* This complete filespec would tell NO that it had to protect files in the \BASIC, not in the current (i.e. root) directory. If you follow our recommendation and enter CD \BASIC NO *.BAS DEL *.* thus making \BASIC your current directory before you start deleting, you will then clean out all but the .BAS files, just as you intended. 3. Should a parity check error, power failure or system crash occur during the brief period between the times NO hides and subsequently unhides the protected files, those files will subsequently seem to have disappeared. They are not lost; only hidden from a DIR listing. Use the DOS ATTRIB command or a similar program to remove their hidden status. @@PARSE PARSE Michael J. Mefford Word count and analysis of text files Version 1.0 ------------------------------------------------------- Purpose ------- Displays the number of characters, words, and sentences in ASCII text files. Format ------ PARSE [d:][path]filename Remarks ------- PARSE also calculates and reports the averages of the numbers of characters per word, words per sentence, and "long" words (8 or more characters). It uses these to calculate and display an approximation of the Fog Index grade-level readability rating. The accuracy of the various counts may be affected, though usually not significantly, by the presence of formatting and printing codes included in the file by non-ASCII word processors. PARSE does ignore the "high-bit" codes produced by WordStar and similar programs, but "dot commands" and the like will be counted. Notes ----- 1. For further information on the Fog Index see Robert Gunning's The Technique of Clear Writing (McGraw-Hill, 1952, 1968). @@PCREMOTE PCREMOTE Terry Lahman & Kevin Sims PC remote control program Version 2 ------------------------------------------------------- Purpose ------- To permit accessing and operating an off-site computer from your own keyboard by using a modem link or a second computer connected via a null modem cable. PCREMOTE will run most text-mode applications remotely. This revised PCREMOT2 version can be used with the ZCOPY program (version 1.4R) included on this disk for two-way file transfer. A SETUP program to allow configuration parameters to be changed is also included. Format ------ PCREMOT2 [/M] [/#] [/B#] [/D] [/S] [/N] [/U] [/?] Remarks ------- PCREMOTE is actually two programs in one. Entered without the /M switch it becomes RAM-resident on the off-site computer to be controlled. This machine and its modem must be left powered on to receive calls but may otherwise be used normally or left unattended. Entered with default parameters, PCREMOT2 becomes an 8K TSR on the host (controlled) computer, using COM1, 1,200 bits per second, no CGA desnowing, and a default password of "PC Magazine". The /M parameter executes the program on the remote (home) machine, and /# accepts values of 1 through 4 for the COM port assignment. (If used, /3 or /4 must not share an interrupt with other devices.) Baud rates are: /B1 (1,200); /B2 (2,400); /B4 (4,800); /B9 (9,600); or /B19 (19,200 null modem only) bps. Used with a modem connection (the remote unit prompts for and then dials the number), the host will automatically reduce speed to match that of the remote machine. The /D parameter should only be used if necessary to eliminate snow on older CGA hosts, and the /S parameter displays an ASCII 2 character to indicate that PCREMOT2 is active. For null-modem cable connections, the /N parameter must be specified on both machines, as must a common /B# speed. The /U parameter uninstalls the TSR and /? provides a syntax help screen. The SETUP program provides for permanent (updatable) configuration of all parameters, change of password (up to 20 characters), entry of special modem- initialisation strings (up to 30 characters), and change of the default Alt-key combinations. Alt-C retransmits the host screen to overcome phone-line noise; Alt-S shells the remote unit to DOS; Alt-X exits the program. Alt-T initiates file transfers, which can only be done when the host is displaying the DOS prompt and ZCOPY.COM is on its PATH. Full prompts are provided for filename(s) (DOS wildcards are supported) and for source and destination file paths. Files cannot be renamed during transfer. Applications in graphics mode (including Windows) are not supported. Previous PCREMOTE versions must be updated on both host and remote machines. A Sample Session with PCREMOT2 ------------------------------ The following is a step-by-step guide to using PCREMOT2: ON THE HOST COMPUTER: Run SETUP, configure for host mode, and verify that the modem COM port and baud rate are set correctly. Make sure you save the configuration (SETUP option 14). The next time you run PCREMOT2 there will be no need to reconfigure. Verify that PCREMOT2 and ZCOPY are stored in a directory listed on the host computer's PATH. (Type PATH to see the current PATH. If the directory containing the two programs in not on your PATH, modify the PATH command in your AUTOEXEC.BAT or move the programs to one of the directories on the PATH.) Execute PCREMOT2. The program will now be resident on the host. If desired, the host monitor screen can be turned off to prevent burn-in over long periods of inactivity. ON THE REMOTE COMPUTER: Run SETUP, configure for manned mode, and verify that the modem COM port and baud rate are set correctly. When prompted, enter the phone number of the office (host) computer. After the modems connect, the host sends the "Enter password:" prompt to the remote computer. Enter the password. (The default is "PC Magazine".) Any data that now appears on the host computer's screen will be displayed on the remote screen, as well. Now you should experiment with PCREMOT2. If you enter DIR, for example, you'll find that scrolling appears a little strange at first. Start a text application, such as a word processor or a utility program. With the application still active, press Alt-X and exit PCREMOT2. The modems will hang up and the call will be terminated. Execute PCREMOT2 and dial back into the host. The application will still be on-screen, executing normally. (Thus, you can start a program that has a long execution time, hang up the phone, and dial back later to see whether the program has finished its task.) Terminate the application or shell out from it so that you see the host's DOS prompt on the remote screen. Press Alt-T and follow the very explicit prompts to transfer a file or two between machines. When you're finished, press Alt-X and exit PCREMOT2. Using the SETUP program ----------------------- SETUP.EXE displays the current configuration of the PCREMOTE program. The user can change configurable items, eliminating the need to enter command line parameters when executing PCREMOTE. SETUP.EXE must be in the same directory as PCREMOT2.COM. SETUP displays menu numbers on each line of the display. To modify a parameter, enter the number and press enter. Parameters that toggle, for example Host/Remote, are toggled and the parameters redisplayed. Parameters having more than one configuration will display the possible options. Parameters requiring an input, a new password, prompt you for the input. If you select communications port 3 or 4, SETUP also updates ZCOPY.COM with the port address and interrupt values used in PCREMOTE. ZCOPY.COM must be in the same directory as SETUP.EXE. @@PCSORT PCSORT Michael J. Mefford Fast general purpose sorting utility Version 1.1 ------------------------------------------------------- Purpose ------- A fast and capable text sorting utility without the limitations of the DOS SORT command. Format ------ PCSORT [filename] [options] PCSORT command line summary: /Sn n=size of record in lines (1-9) Default=1 /Pn n=sort priority (1-9) Default=1 /R Sort current priority in reverse order Default = ascending /N Numeric sort current priority Default = Alphanumeric /L[n] Line sort: n=record sort line (1-9) default=1 default sort is a line sort /[B][+] nn [xx [y]] Block or column sort: nn=start column xx=width y=sort line (1-9) defaults: nn=1; xx=start column to end of line; y=1 /W [+|-] n Word sort: n=word count default = +1 - n = count from end of record /C Case sensitive sort Default = Case insensitive Shown above are the many switches you can use, either at the command line or within batch files, to configure PCSORT for your own needs. The options listed need be used only if you're using PCSORT as a filter -- in combination with the DOS redirection characters |, <, and >. A common example is piping DOS directory's output to a filter and redirecting the filter's output to a file. PCSORT menu command summary: PgUp/PgDn Next page Arrow keys Cursor Home(1) Beginning of column Home(2) Top of page Home(3) Top of text End(1) End of column End(2) End of page End(3) End of text Ctrl-Home Beginning of text Ctrl-End End of text Enter Beginning of next line F1 Displays all sort fields at a glance Alt-F1 Resets all the sort variables to defaults F2 Save file F3 New file F4 Sort text F5 Increase lines per record (1-9) Shift F5 Decrease lines per record /F6 Select next key priority (1-9) Shift F6 Select previous key priority} F7 Sort order (de/ascending) F8 Alphanumeric or Numeric sort F9 Select next Field type: Line, block, word or none Shift F9 Select previous Field type F10 Mark the record line for line sort or mark block sort field or select sort word count Shift F10 Reverse selection of word count Esc Exit PCSORT This listing of PCSORT's navigation keys demonstrates the program's versatility in sorting in up to 9 priority orders. Each priority can be set independently of the others. Key commands, in general, operate as you might expect. Note, however, the varied uses of the Home and End keys for travelling throughout the file; each key's role, here, depends on the number of times you press it. Customizing PCSORT ------------------ Some systems, especially laptops, do not display colour contrasts very well. If you find PCSORT hard to read, you can force PCSORT to use black-and-white attributes by entering the command MODE BW80 before running it. The best way to do that is from a batch file, as shown: MODE BW80 PCSORT %1 %2 If you have a colour system and PCSORT is using black and white attributes, chances are some other application has changed the video mode. To encourage PCSORT to use colour, issue the DOS command MODE CO80 before running PCSORT. The following instructions will enable you to customise the colours used by PCSORT. Start by making a back-up copy of PCSORT.COM and then enter DEBUG PCSORT.COM You are now ready to modify PCSORT.COM. If at any time you make a mistake, you can abort the editing process by entering Q. The last two commands that you enter after entering any modifications are W Q for Write to disk and Quit DEBUG. Colour scheme: Enter the following Debug instructions, replacing the xx with a hexadecimal colour value. The default colour values for the menu colour, the text, and the block marker, and their respective descriptions are shown as comments to the right of the semicolons. Do not type in the comments. E 106 xx ; 71 Blue on light gray E 107 xx ; 17 Light gray on blue E 108 xx ; 31 Blue on cyan Alternate colours may be selected from the following list. The background colour number is entered for the first x and the foreground colour for the second x. Do not use a light colour for the background, or the display will blink. Dark colours Light colours ------------ -------------- Black 0 Dark Gray 8 Blue 1 Lt Blue 9 Green 2 Lt Green A Cyan 3 Lt Cyan B Red 4 Orange C Magenta 5 Violet D Brown 6 Yellow E Lt Gray 7 White F For example, to change the Block marker colour from blue on cyan (31) to blue on light gray (17), you would enter E 108 17 PCSORT turns on the border, and some monitors can not handle that. To disable the border, enter E 10C 1 Replace the 1 with a 0 to re-enable the border. Finish the DEBUG session with W Q @@PLAY PLAY Michael J. Mefford Plays tones and tunes on the PC's speaker Version 1.0 ------------------------------------------------------- Purpose ------- Provides many of the music-producing functions of the BASIC PLAY statement without the need to work in BASIC. Format ------ PLAY[/K] (Option I) PLAY string[/K] (Option II) PLAY filespec/F[/K] (Option III) Remarks ------- Entered at the DOS prompt with no arguments on the command line (Option I), PLAY looks in the current directory for a file named PLAY.DAT and executes the commands in that file. The PLAY.DAT file included on this disk is "Greensleeves." The file can be examined, and similar files created, with a regular ASCII word processor. Alternatively, PLAY can use either a command-line string (Option II) or any legal DOS filename (Option III) to supply the music command arguments. Filenames may include a path designation, but must include the /F terminator. A sample file "score," STING.DAT is contained on this disk. Pressing any key while PLAY is executing will terminate operation unless the /K switch has been added. The command set used with PLAY is shown on the following page and is exemplified in the PLAY.DAT and STING.DAT files. The PLAY Command Set -------------------- K Keyboard. K will cause PLAY not to poll the keyboard during play. If K is not found, any keystroke will exit. On Octave. n is a decimal number between 0 and 6. Middle C starts 03. The default is 04. Ln Length of time the notes will be played until the next L command is encountered. n is a decimal number between 1 and 64. For example, L4 = quarter-note and L8 = eighth note. Tn Tempo is the pace at which the music is played. n is a decimal number between 32 and 255. The larger the number, the faster the pace. The default is T120. A-G Letter names corresponding to the notes of the scale. The letter name may be followed by either a # or + for a sharp, or a - for a flat. O3C = middle C. Nn Note to be played. n is a decimal number between 1 and 84. Each increment is 1/12 of an octave. N can be used as an alternative to defining a note by a letter and an octave. For example, N37 = middle C. Pn Pause, or rest, for a length defined by n. P works in the same way as the L command above. For example, P2 = a half rest. MN Music Normal. The note is played 7/8 of its specified time, and 1/8 is a rest between notes. This is the default. ML Music Legato. The note is played the full length of time specified. MS Music Staccato. The note is played 3/4 of the time specified, and 1/4 is a rest between notes. . Dot. A dot can follow a letter note or a pause. A dotted note increases play time by half the duration of the note or pause. More than one dot may be used. @@PUSHDIR & POPDIR PUSHDIR & POPDIR John Friend Save and restore current directory Version 1.0 ------------------------------------------------------- Purpose ------- This pair of programs provides a way to return automatically to your current directory after running programs that require directory changing. Format ------ PUSHDIR ... command(s) that run program or change directory ... POPDIR Remarks ------- While PUSHDIR and POPDIR can be entered directly from the DOS prompt, their primary application is in batch files. For example, suppose you create a file named 12.BAT that consists of the following four lines: PUSHDIR CD\LOTUS 123 POPDIR Suppose also that 12.BAT, PUSHDIR.COM, and POPDIR.COM are either in your root directory or in a subdirectory on the PATH specified in your AUTOEXEC.BAT file. Assume, finally, that you are currently in your word processing subdirectory (\WP), but need some information from a 1-2-3 spreadsheet. If you now enter 12 from the DOS prompt, PUSHDIR stores the \WP (your current directory) on its stack and DOS changes to the \LOTUS subdirectory and runs 1-2-3. When you exit from 1-2-3, you would normally be left in the \LOTUS subdirectory. A DOS CD command in 12.BAT after the 123 line could return you to a specified directory every time you terminated 1-2-3, of course. But POPDIR returns you to whatever subdirectory you were in when you invoked 1-2-3 -- in this case, to your \WP subdirectory. PUSHDIR can accommodate up to six levels of directories on its stack, permitting considerable programming flexibility in constructing batch files. Notes ----- 1. PUSHDIR and POPDIR require DOS 2.0 or later. @@RUN RUN Michael J. Mefford Runs programs from any directory Version 1.0 ------------------------------------------------------- Purpose ------- Executes .COM, .EXE, or .BAT files from any disk directory without requiring changing directories or specifying a path to the file. Format ------ RUN [/C|/S][d:][directory]filename [args] Remarks ------- Unless the optional directory parameter is specified, RUN defaults to a diskwide search to find the executable filename. Any additional arguments (args) that would normally be specified on the DOS command line may be added to the program RUN is called upon to execute. A drive specifier (d:) must be used if the file to be run is not on the current drive. During its search, any keypress will abort the operation of RUN.COM. RUN can either operate from the current directory (its default mode, designated by the optional /S switch) or it can change to the directory (/C) in which it finds the desired program before executing it. The /C option is required by programs such as WordStar, which can find their overlay files only when loaded from within the directory in which they are stored. The /C option is also required to run .BAT files under DOS 2.x (see Note below). Note ---- RUN overcomes the inability of DOS 2.x to handle .COM and .EXE files that are prefixed with a path. Batch files under DOS 2.x, however, still require RUN's /C option. If desired, the /C option can be made the RUN default mode, with /S as its selectable alternative. To make this change, put a copy of RUN in the same directory with DEBUG.COM, and enter the following commands: DEBUG RUN.COM E 15B 1 E 1E8 "C" W Q If you later upgrade your version of DOS and wish to reverse the process, use the same procedure with the following commands: DEBUG RUN.COM E 15B 0 E 1E8 "S" W Q @@SCHEDULE SCHEDULE Michael J. Mefford Appointment scheduler and diary Version 1.0 ------------------------------------------------------- Purpose ------- An appointment scheduler that provides both a monthly overview and a detailed daily screen with notepad and optional reminder chime; includes editing, printing, and archiving facilities and can be used as either a standalone or a memory-resident utility (15KB RAM required). Format ------ SCHEDULE [/I] [/U] [/Hn] [/Pn...n] [/G] [/A] [/C] [/M] [/B] Remarks ------- When installed as memory-resident by using the optional /I switch, SCHEDULE automatically reminds you of appointments by chiming and popping up its appointment screen. The default hotkey is Alt-C. This can be changed with the /H switch to any alphanumeric Ctrl- or Alt-key combination (n), either at or after installation. To make Ctrl-S the hotkey, enter SCHEDULE /H Ctrl S. The /P parameter allows sending up to 10 decimal printer set-up codes (n...n). Include the /G switch for printers that support the IBM line-drawing characters. The reminder chime can be disabled by including the /C switch, and automatic screen pop-up can be avoided by using the /A option. The /M parameter prevents the default midnight pop-up so overnight programs can be run. If screen contrast is a problem (e.g. with laptops), use the /B (black-and-white) option. SCHEDULE can be uninstalled with the /U option, subject to usual limitations. SCHEDULE.COM and the two files it creates (SCHEDULE.DAT and SCHEDULE.ASC) must be stored in the current directory when the program is run as a standalone or installed as a memory resident. Batch files will simplify this requirement. As a text-based program, SCHEDULE will not come up over a graphics screen (e.g. Microsoft Windows); it must be installed before SideKick (if used). SCHEDULE.DAT contains all appointment records saved by pressing F2 (see command summary overside). It can be purged or archived in whole or part by pressing F4. A suitable date up to which to purge can be selected by F3 (today) or with the PgUp/PgDn keys (moves by days) or with Ctrl-PgUp/PgDn (moves by months). F8 selects an individual day for purging. Menu prompts are provided for determining whether the selected records are deleted or automatically appended to SCHEDULE.ASC to provide a permanent record usable by any ASCII editor. The monthly ("calendar") and daily ("appointment") displays cover the period from 6:30 A.M. to 9:30 P.M. in hour and half-hour increments, respectively. Within each screen the following commands can be executed: Keystroke Calendar Screen Appointment Screen --------- --------------- ------------------ PgUp/PgDn Next month Next Day Ctrl-PgUp/PgDn Next year Next Month Arrow keys Select day Navigate screen Home(1) Beg. of column Beg. section column Home(2) Beg. of calendar Top of section End(1) End of column End section column End(2) End of calendar End of section Ctrl-Home Beg. of calendar Beg. of section Ctrl-End End of calendar End of section Ctrl <- Beg. of column Beg. section column Ctrl -> End of Column End section column Enter Select app't. Enter Esc Exit Schedule Return to Calendar F2 Save app'ts. Save app'ts. F3 Today Today F4 Purge app'ts. Purge app'ts. F5 Print calendar Print app'ts. F6 Go to Notepad Shift-F6 undefined Clear section Ctrl-F6 undefined Clear all 3 sections Tab undefined Go to next section Shift-Tab undefined Go to prev. section Del undefined Del. char. at cursor Customising Schedule -------------------- The following instructions will enable you to customise the colours used by SCHEDULE and to change the tone of its chime. Start by making a backup copy of SCHEDULE.COM and then enter: DEBUG SCHEDULE.COM You are now ready to modify SCHEDULE.COM. If at any time you make a mistake, you can abort the editing process by entering Q. After entering any desired modifications last two commands you enter are: W Q for Write to disk and Quit DEBUG. COLOUR SCHEME Enter the following DEBUG (E)nter instructions, replacing the xx with a new hexadecimal colour value. The default colour values and descriptions that SCHEDULE uses are shown as comments, to the right of the semi-colons. E 578 xx ; 17 Lt. gray on blue. E 579 xx ; 71 Blue on lt. gray. E 57A xx ; 1E Yellow on blue. E 57B xx ; 3B Bright cyan on cyan. E 57C xx ; 1B Bright cyan on blue. E 57D xx ; 7E Yellow on lt. gray. Alternative colours may be selected from those listed below. The background colour number is entered for the first x and the foreground colour for the second x. Do not use a light colour for the foreground, or the display will blink. Dark colours Light colours 0 Black 8 Dark gray 1 Blue 9 Lt. blue 2 Green A Lt. green 3 Cyan B Lt. cyan 4 Red C Orange 5 Magenta D Violet 6 Brown E Yellow 7 Lt. gray F White For example, to change the yellow on blue (1E) to red on blue (14) you would enter E 57A 14 CHIME TONE The value used to calculate the tone of the chime is a hexadecimal number that can range from a low of 0025 to a high of 1150. The default value is 0416. You'll find numbers close to the default more pleasing. To change the tone, enter E 584 yy xx where xxyy is the new tone divisor. For example, to change the tone from the 416 Hz C note to an A (a divisor of 370), you would enter E 584 70 03 Note that the numbers must be entered exactly as shown above. The 70 03 (yy xx) represent 0370 (xxyy). @@SWEEP SWEEP Charles Petzold Repeat command in each subdirectory Version 1.0 ------------------------------------------------------- Purpose ------- Causes a command to be successively executed in every subdirectory on a hard disk. Format ------ SWEEP command Remarks ------- SWEEP starts from the current directory. In order to use SWEEP to extend the range of a command to all the subdirectories on a disk, use CD (if necessary) to make the root directory your current directory. From the root directory, the command SWEEP DIR will display the listings, by subdirectory, of every non-hidden file on the disk. To erase all the .BAK files on a disk you need only get into the root directory and issue the command SWEEP DEL *.BAK SWEEP itself will not accept parameters other than its command. Thus, if you are on drive C: and wish a directory of all files on drive D: to be sent to your printer, you must first make drive D: the current drive before you issue the command SWEEP DIR > LPT1 (In this case you would either need a copy of SWEEP.COM on drive D: or else drive D: would have to be listed on your PATH.) SWEEP can execute .BAT file commands (and even non-DOS commands, such as LOCATE.COM). A useful file called CLEAN.BAT might consist of the three lines DEL *.BAK DEL *.TMP DEL *.OBJ From the root directory, if you then enter SWEEP CLEAN all .BAK, .TMP, and .OBJ files will be erased from the disk. Notes ----- 1. Requires DOS 2.0 or later. @@TED TED Tom Kihlken Text editor Version 1.1 ------------------------------------------------------- Purpose ------- A small, full-screen editor for line-oriented files of up to 64K in length that supports scrolling, cut, copy, paste, and printing operations, and permits entry of all members of the IBM character set. Format ------ TED [filespec] Remarks ------- TED will open and read a file whose name (and path, if required) are supplied initially. If no filespec is provided it will open a new file and prompt for a filename when the Save and Exit command (F7) is given. The original of a modified file is saved with a .BAK extension. The Abort command (F1), when verified, abandons any modifications and leaves the original file intact. Lines may be of any length, and each must be terminated by pressing Enter. Lines longer than the screen width display a diamond in the rightmost column. Offscreen characters (up to 248 columns) may be viewed by using the Ctrl- keys. Lines may be broken by pressing Enter at any point, and may be conflated by pressing Delete at the line end. A block of text is defined by toggling on the Mark command (F4) and moving the cursor with the arrow keys. The Marked area is shown in inverse video. Pressing F3 prints the blocked text; F5 (Cut) removes it to a buffer from which it can be Pasted (F6) at any point where the cursor is located. The paste buffer remains intact until another section is marked and cut. Pressing F8 deletes to the end of a line; F9 deletes the entire line. F10 restores the most recent deletion of F8 or F9. The Undo command (F2) restores letters deleted by the Delete (but not by the Backspace) key if the cursor has not been moved. The Home and End keys move the cursor to the beginning and end of the current screen line; the Tab key moves to the next column evenly divisible by eight. Text is entered in Insert mode by default; pressing the Insert key toggles to overstrike mode. TED configures itself to the display in use and supports EGA and VGA text modes other than the standard 80 columns by 25 rows. PgUp and PgDn scroll the file by the number of rows displayed, minus 5. Ctrl-PgUp and Ctrl-PgDn move to the top and bottom of the file. Any character in the IBM set can be entered by pressing the Alt key, typing its ASCII value on the numeric keypad, then releasing the Alt key. @@TRACKR TRACKR Scott Chaney Time tracking utility Version 1.2a ------------------------------------------------------- Purpose ------- Trackr is a memory-resident utility that keeps track of the time you spend on a project. If you bill clients by the hour it can multiply the logged time by your hourly rate using the information you enter in a client data file and prepare a printable billing report. Remarks ------- A 7K memory-resident utility, TRACKR lets you create or switch tasks at any time, stop the clock temporarily, switch applications with the clock running, combine multiple separately timed tasks for the same client into a single billing report, and update your task log at a keystroke. Increments for partial-hour calculations can be as small as 1 minute. If at any time you are in a TRACKR menu and wish to return to your application, simply press Esc key. If you're two or more menus deep, you will have to hit the Esc key twice. You can use any ASCII editor -- DOS 5.0's EDIT, PC Magazine's TED, or even your word processor (in its nondocument mode) -- to create CLIENT.DAT, the file holds the billing information for each of your accounts. A typical entry in CLIENT.DAT might be: ABC Developments Ltd 123 Anystreet Anytown, AT1 4RS 0039 49671 \30\15 After the line containing the client name, you can include any number of additional lines (each terminated by pressing Enter) that you want TRACKR to print out in its billing report. In the above sample, for instance, you might want to add an account number code for the client, or you might decide you don't want to include the phone number on the invoice. Anything between the client's name and the last line of each client entry is optional. The last line in each client entry is the only one that must follow a specific format: \$$$\mm\, where $$$ is the rate at which you bill this client per hour, and mm is the minimum billing increment in minutes. The last line in the sample entry above, therefore, tells TRACKR that you bill ABC Developments at 30 punds per hour and that partial-hour calculations should be rounded up to the next 15 minutes. Note that the billing rate and increment line must be the only line whose first nonspace character is a backslash. Your CLIENT.DAT file will hold the multiline entries for up to 30 clients, and entries can be separated by blank lines or not, as you choose. If you put more than 30 clients in your CLIENT.DAT file, TRACKR will notify you with the message, "Ignoring Extra Clients". You can either continue (but not have access to all your clients) or uninstall TRACKR, edit your CLIENT.DAT file down to 30 clients, and run TRACKR again. Do not edit CLIENT.DAT while TRACKR is running. Using TRACKR ------------ When you have created your CLIENT.DAT file, you're ready to install TRACKR. You can do this simply by running it, either from the DOS prompt or as a line in your AUTOEXEC.BAT file. The full syntax for TRACKR is TRACKR [/#] [/U] [/I d:\path] THE "CLIENT.DAT" FILE MUST BE IN THE SAME SUBDIRECTORY WHERE THE .LOG FILES ARE TO BE LOCATED. THE FIRST TIME YOU USE TRACKR YOU MUST TELL IT WHERE THE CLIENT.DAT FILE AND THE .LOG FILES ARE TO BE KEPT. You do this by using the "/I d:\path" command line option. For example, if want your log reports kept in the C:\BILLING subdirectory, then move CLIENT.DAT into that subdirectory and start TRACKR with the following line: TRACKR /I C:\BILLING TRACKR will thereafter remember where you keep its ancillary files, so you need only use the /I switch once. When you're logged onto a task, TRACKR periodically displays the name of the active task and the elapsed time (in hh:mm) since you started it. This reminder appears in the upper-right corner of your screen for 5 seconds, and by default it is repeated once a minute. You can disable the reminder or change how often it appears by using the /# command line switch when you install TRACKR. The n value is the number of minutes that should elapse between reminders, and it can range from 0 (no reminder) through 9. When in Pause mode (described below), the reminder pops-up as before, except that instead of displaying elapsed task time it reminds you that you're in PAUSE mode. The /U command line switch allows you to uninstall TRACKR from memory, subject to the usual limitation that TSR's must be uninstalled in the reverse order in which they were loaded. If at any time you forget the command syntax, simply enter TRACKR /?. Once loaded, TRACKR pops-up when you press Ctrl-R. Any time you are in a TRACKR menu and wish to return to your application, simply press Esc. TRACKR can pop-up only in text modes. Thus, if you need to access the utility while running a program that uses graphics modes, you must get to a part of the program that uses text mode before the hotkey will have any effect. If necessary, you can go out to the DOS prompt, using the application's "shell" function. Only in the worst case might you temporarily have to exit the application. The first time you use TRACKR, it will notice that you haven't created any tasks to be timed for any of the clients listed in your CLIENT.DAT file. TRACKR will therefore simply present you with a list of the clients. (Only the first 21 characters of each client's name will be shown.) When you select a client you'll be asked to provide a Task Name. The Task Name can be 8 characters long and must not contain anything that cannot be part of a legal DOS filename or begin with a backslash. (TRACKR will append the extension .LOG to the Task Name, and this combination becomes the filename of the billing report.) When you type in the desired Task Name and hit Enter, TRACKR will prompt you for a comment, the can be up to 30 characters and is designed for short notes or identifiers such as "First Qtr Results." Whether you include a comment or not, hit Enter once again. You will be returned to the application in which you were working (or to DOS, if you shelled out), and TRACKR will start the meter on the task you have just created for the selected client. TRACKR menus ------------ If you now hit Ctrl-R again, the task you just created (along with others, as your task list grows) will appear on the left side of the menu window. On the right side are five menu choices: Pause, Log Off, Switch, Create New Task, and Update Task Log. Press the highlighted letter to select the desired function, or press Esc to return to your application. If you're interrupted during a task and want to suspend billing time during the interruption, press P for Pause. That way you don't have to log off and relog onto the same task later. When you want to resume, press Ctrl-R to get to the menu and hit R for Resume. Press L from the menu to Log Off the currently active task. TRACKR will then stop charging time to the active task, write the time information to that task's log file, and recalculate the billing entries in that task's log file. Pressing S (for Switch) provides a shortcut option that logs you off the current task and immediately logs you onto another. This is particularly handy when you're working on one project and get a billable telephone call for another client. Note that each available task is identified in the menu by both name and number; when switching tasks you enter the number of the new task. To create a new task, you press C for Create Task at the menu. This will initially bring up an alphabetical list of all the clients from the CLIENT.DAT file, displayed on the left side of the pop-up window. Since TRACKR can only display five clients at a time, you may need to use the PgUp and PgDn keys to go though the entire list. Select the client to be billed (again, by number), and you'll be asked to provide a Task Name (remember, it can only be 8 characters). You'll again have the option of entering a comment. Once you press Enter, TRACKR logs you onto the new task and returns you to your application. Over time, you will probably create more tasks than the 10 that can be displayed at once in the menu window. The PgUp and PgDn keys will again take you through the entire list, which is limited to a total of 50 tasks (.LOG files). If you create more than 50 tasks, TRACKR will warn you when you load it into memory. Since all the tasks you create are listed alphabetically rather than being grouped by client, you may want to include a client code in every Task Name. For example, you may want to have a Phone Task for each client so that when he calls you can immediately start tracking the amount of time you're on the phone with him. Thus, if you have three clients--ABC Corp., XYZ Corp., and PC Corp--you might have Task Names of ABCPHON, XYZPHON, and PCPHON. As mentioned earlier, TRACKR takes a Task Name, such as "proposal," and creates a PROPOSAL.LOG file from it. The .LOG file for each task contains the client information entered in the CLIENT.DAT file, plus an entry for each time you start the task. Each entry consists of the date, the time you began the task, the time you stopped the task, the time spent on the task, and any comments you entered in the Comment field. The file also tallies the time totals for each day and multiplies these by the billing rate, thus coming up with a billable amount for each day. The last entry in the .LOG file is the total amount of time spent and money due for the entire task. If you want to update the calculations without leaving the task, you simply hit U, for Update a task, which is the final selection from the menu. Note that when TRACKR calculates the time you spent working on a task it always rounds up to the next billing increment: If you work on a particular task for 16 minutes and you bill in 15 minute intervals, TRACKR will bill for 30 minutes. Since the log file shows the actual log-on and log-off times, you may occasionally want to adjust the log-off time shown in the file to avoid overcharging. TRACKR will update the calculations, based on the corrected time, the next time you perform the task or use the Update function. Rounding up to the next billing increment can cause similar confusion when you encounter a series of interruptions and are using the Pause feature. Each time you resume, a new entry is started, and rounding up a series of short fractional increments can plainly result in overcharging. One solution is to bill in smaller minute increments (down to one minute), but again there will be times when you want to edit the file and update it before printing it for your client. You can use any ASCII editor to edit a .LOG file and delete, add or adjust any entry. When editing, be sure to keep the columns lined up, and use spaces (not tabs) to keep everything in line. Note, however, that when TRACKR updates a .LOG file, it pays attention only to the date, start time, end time, and comment fields. If you need to adjust a total, therefore, you must do so by adjusting the start or end times. TRACKR's recalculations will wipe out any editing changes you make in a total field. You can, however, edit the client information shown in the .LOG file, including billing rate and billing increments, and these changes will be reflected at the next update. When the .LOG file is finalised, you can use your word processor, any print utility, or the DOS command TYPE filename > PRN to print out the billing report. When no task is currently being metered, pressing Ctrl-R brings up a menu with only three choices on the right side of the menu: Create new task, Update task log, and Log in new task. Only the L (for Log in) option is new here, and the procedure is familiar. After pressing L, you select the desired task from the list by entering its number rather than its name and then by entering a comment, if desired. TRACKR will immediately return you to your application and start tracking your time on this task. Two final notes are in order. You must always load TRACKR before you load Microsoft Windows. If TRACKR still doesn't pop up in the application you're running under Windows, then open the DOS window in the Main folder and pop it up from there. Note also that you may have to install TRACKR before you open other DOS applications. If you shell out from a program and try to load TRACKR, you may not be able to get it to pop up within the application. Scott Chaney is the founder of RSE, a company in Auburn, Washington, that specialises in the development of productivity shareware for PCs. Revision History ---------------- Version 1.0 Initial Release 1.1 1/7/92 Bug fixes 1.2 1/29/92 Fixed errors in reading CLIENT.DAT and attempted pop-ups during non-text screens. @@WAITASEC WAITASEC Charles Petzold Permits backward scrolling of DOS screen Version 1.0 ------------------------------------------------------- Purpose ------- Uses the single-keystroke ScrollLock key to halt a fast-scrolling display; then allows you to scroll backwards, recalling previous screens. Format ------ WAITASEC (loads memory-resident program) then (activates WAITASEC) Remarks ------- WAITASEC is a memory-resident program that is normally loaded through your AUTOEXEC.BAT file. Thereafter, alternately pressing and releasing the ScrollLock key will halt and restart a scrolling display, e.g. a lengthy DIR listing. While holding down the ScrollLock key to freeze the display, if you also press one of the cursor movement keys (Home, Up Arrow, PgUp, End, Down Arrow, or PgDn), the display will not resume scrolling when you release the ScrollLock key. Thereafter, the Up and Down arrow keys move the display by one line, the PgUp and PgDown move it by 25 lines, and the Home and End keys take you to the beginning and end of the stored screen memory. Pressing any non cursor key at this point deactivates the stored mode, and the original scrolling resumes. Notes ----- 1. WAITASEC will not work with an 80-column colour display if an unmodified PC-DOS ANSI.SYS has been loaded. (The ANSI.SYS that comes with various versions of MS-DOS does not cause problems with WAITASEC.) To run with IBM's ANSI.SYS, make a copy (MODANSI.SYS) of the original ANSI.SYS and use DEBUG to patch the copy as follows: DEBUG MODANSI.SYS E 29D 90 90 E 2A1 90 90 W Q Put the modified MODANSI.SYS in your CONFIG.SYS file in place of ANSI.SYS. 2. Because of the way they handle TTY output, certain EGA cards will not permit WAITASEC to scroll backwards. This problem can often be cured by adding MODANSI.SYS, as above. 3. WAITASEC does not save your current display screen. 4. While WAITASEC has been found compatible with XyWrite III (XYKBD.COM loaded) on a PC/AT, as with other memory-resident programs, unforeseen hardware and software incompatibilities may be encountered. @@ZCOPY ZCOPY Bob Flanders High-speed serial file transfer Version 1.4R ------------------------------------------------------- Purpose ------- Transfers files at high speed, via a serial link, between two PCs. It can be used to move files between machines that do not share a common disk format, such as a laptop and desktop PC or to conveniently move large quantities of data between two standalone PCs. ZCOPY can also be used with the PCREMOTE program included on this disk to move files via modem. Format ------ ZCOPY source [target] [/w][/n][/u][/o][/a][/p][/d] Remarks ------- The two machines must be IBM-compatible and must be connected by a standard "null modem" cable. ZCOPY is executed, with appropriate parameters, on both machines; a 30-second (default) connect timeout is provided. On the sending machine both a source (filename plus any needed drive and path) and a target (COM1 or COM2) must be specified. ZCOPY supports the * and ? DOS filename "wildcards," but it does not permit renaming files during transfer. On the receiving machine the source is COM1 or COM2, and the target, if specified, must be a directory path. (Any needed subdirectories must be created on the receiving machine before using ZCOPY.) The optional /w and /n switches operate before connection is established, and so are entered on the ZCOPY command line of each machine. The /w parameter prolongs the default connection timeout indefinitely; it can be cancelled with Ctrl-Break. The /n parameter sets the highest bit-per-second (bps) rate at which ZCOPY will attempt to transfer data. If used, it must be the same on both machines. The default is /1 (115 kbps). Other acceptable values are /2 through /6 (57.6 kbps, 38.4 kbps, 19.2 kbps, 9600 kbps, and 4800 kbps, respectively). If ZCOPY cannot maintain error-free transfer at a given transfer rate, it automatically steps down to the next lower speed. The other optional parameters may be entered on either machine's ZCOPY command line. The /u (Update) switch permits overwriting same-named files on the receiving machine without operator confirmation if the source file is more recent. The /o (Overwrite) switch suppresses the confirmation prompt for all files. By default, when ZCOPY receives a disk-full signal, before aborting it tries to find a smaller selected source file that will fit on the receiving disk. The /a (Abort on Full) aborts at the first disk-full indication. The /p (Pause) switch creates a pause before the transfer operation begins after the connection between machines has been made, permitting changing a disk. The /d option changes the date of a received file to that of the receiving machine. Null modem cable ---------------- A Null modem cable is one that allows data to be transmitted directly between two PCs and most dealers will be able to supply a suitable one. If you need to have one made, ZCOPY's standard configuration is: 1st Machine 2nd Machine ----------- ----------- PIN PIN 2 <----------> 3 3 <----------> 2 7 <----------> 7 All other leads are optional and are not used by ZCOPY. Transferring ZCOPY without common media --------------------------------------- If you find yourself in the situation where you have ZCOPY one one machine but not on the other and can't get ZCOPY on a disk for the other machine, you can use the following procedure to transfer ZCOPY itself over the serial link. 1. Connect the two machines together via the null modem cable. You must know which communications ports you are using. 2. At each machine, set the communications port to the same communications parameters use the DOS MODE command. Enter: MODE COM1:1200,N,8,1 Substitute COM2, COM3 or COM4 if appropriate on each machine but keep the other values the same. 3. On the machine receiving ZCOPY, do the following (without the comments): A>COPY CON TMP.DBG ; Build the debug script n zcopy.com ; Name of the received program a 5000 ; Assemble at a high address CALL 5016 ; Get low character of count MOV CL,AL ; cl = low byte CALL 5016 ; .. Get high character MOV CH,AL ; cx = length of program PUSH CX ; .. save it MOV DI,0100 ; di -> output area for program CALL 5016 ; Get program character STOSB ; Store it LOOP 500E ; .. Loop until all received POP CX ; cx = length for write INT 3 ; .. return to debug ADD DX,+05 ; dx -> line status register IN AL,DX ; al = lsr value TEST AL,01 ; q. any data available? JZ 5019 ; a. no .. loop until ready SUB DX,+05 ; dx -> data register IN AL,DX ; get the character RET ; return w/al = character ; enter a blank line to stop rdx ; set dx ... :3f8 <== Note: This would be 3F8 for COM1, 2F8 for COM2, 3E8 for COM3, 2E8 for COM4! g=5000 ; start the program rip ; IP = write address :100 ; .. address 100 hex w ; write out ZCOPY.COM q ; .. and back to DOS ^Z ; (or use F6) A>debug debug zcopy.com ; bring in zcopy rdx ; setup the comm port :3f8 <== Note: This would be 3F8 for COM1, 2F8 for COM2, 3E8 for COM3, 2E8 for COM4! g=103 ; call the self-transfer routine ; (30-40 secs will pass) AX=00CC BX=0000 CX=0000 DX=03F8 SP=FFFE BP=0000 SI=1354 DI=0000 DS=1FE1 ES=1FE1 SS=1FE1 CS=1FE1 IP=1353 NV UP EI PL NZ NA PO NC 1FE1:1353 CC INT 3 q A> ZCOPY is now on the receiving machine.