|DÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ |Dº |5The Happy Hacker |DºÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ |DÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ ^C^1DOS COMMAND HISTORY ^Cby ^CBryan Higgins DOS COMMAND HISTORY (referred to as HISTORY in the rest of this documentation) is a program for PC-DOS 2.0 and later which allows the user to recall, edit, and reissue previously-typed DOS commands. If a mistake is made on the command currently being entered but is not noticed until after several more characters have been typed, the mistake may be fixed without deleting the intervening characters. The user steps back and forth through old commands using the up- and down- arrow keys. The left- and right-arrow keys may be used to move within a line. Home moves to the beginning of the line, while End moves back to the end. The Delete key deletes the character to the left of the cursor and the Remove key deletes the character under the cursor. Normal characters are inserted into the line. When the user types Return, the entire line is sent regardless of the position of the cursor. A line may be recalled by content by typing F9; the user is then prompted for a search string. The history list is searched backwards for the line beginning with the specified string. To search for the next-most recent occurrence of the string, the user merely hits the F8. As a shorthand for F9, F10 prompts for a single-character search string without a carriage return; the selected string is automatically sent. The string seleted by F9 or F10 is remembered between HISTORY invocations. Subsequent uses of the Find key use this string until another is chosen. Multiple DOS commands may be entered on one line by separating them with a semicolon. The commands will be sent one at a time to DOS. A semicolon as the last character on the line will be sent along (hello, MicroSoft). To enter a semicolon mid-command, type two (one will be sent). Other commands are summarized below. ^CInstallation HISTORY is enabled by executing HISTORY.EXE once per boot, typically from AUTOEXEC.BAT. It requires about 5K of dedicated memory. It cannot be run from the BIG BLUE DISK menu; you must type HISTORY from the DOS command level. HISTORY works by trapping DOS function 0AH. Since programs other than COMMAND.COM also use function 0AH, HISTORY must dis-tinguish COMMAND.COM from the crowd. It does this by remembering the address of the very first program to call it after it's been loaded; to insure that COMMAND.COM is the first caller, make HISTORY the last command in AUTOEXEC.BAT or invoke it manually. Command Summary Up-arrow or Move back through commands PgUp Down-arrow or Move forward through commands PgDn Left-arrow Move the cursor left one character Right-arrow Move the cursor right one character Home Move the cursor to the beginning of line End Move the cursor to the end of the line Cntrl-left-arrow Move the cursor left one word Cntrl-right-arrow Move the cursor right one word Backspace Delete the character before the cursor Delete Delete the character under the cursor Ctrl-Home Delete from the beginning of the line to the cursor Ctrl-End Delete from the cursor to the end of the line Insert Toggle insert/overstrike mode (starts each time in insert mode). Return Send the line F9 Select and find search string F8 Find next occurrence of string (remembered between commands) F10 Select and find one-character search string; send the line F7 Same as typing "EXIT"; useful for leaving secondary COMMAND.COM's. F6 Lists the contents of the history buffer, oldest to most recent. F5 Turns HISTORY off; commands are parsed via normal DOS code until Control-Z followed by Return is typed. ; If not the last character on the line, splits DOS commands. They are handed one at a time to COMMAND.COM. If last on the line, it is sent along as part of the command. To send a semicolon mid-command, type two semicolons. Printer Considerations When printing a file using the standard DOS print spooler PRINT.COM, lines are sent to the printer only when awaiting DOS input; since HISTORY bypasses DOS input when awaiting command input, the printer will stop until a command is run. Similarly, Control-P (printer toggle) will not be recognized in HISTORY. The solution to both problems is to use F5 to turn HISTORY off long enough for the file to print or to type Control-P (once toggled on you may turn HISTORY back on; printing will take place in this case). To turn HISTORY back on, type Control-Z followed by Return. Copyright (c) 1985, 1986 by Bryan Higgins. DISK FILES THIS PROGRAM USES: ^FHISTORY.EXE