home *** CD-ROM | disk | FTP | other *** search
- LASTCOM
-
- This utility is intended to be installed at boot up time. When executed
- LASTCOM will check if it has already been installed once; if not, it will make
- itsself permanently resident (until rebooted). LASTCOM will examine keys as
- they are entered from the keyboard. Strings of characters which begin with
- a printable character and end with a carriage return (up to 60 characters) are
- saved in a "push down" stack. If at any time the user whishes to recall the last
- 10 commands entered, he enters AltF10. LASTCOM will open a window on the screen
- saving whatever was there, and display the first 20 characters of the last 10
- strings saved. Entering any character besides a function key or a shift function
- key will cause the window to close and the key entered to be processed normally.
- Entering a function key will cause the command appearing next to the function
- key to reappear and be reexecuted. Entering a shift function key causes the
- string to reappear, but the command is not executed.
-
- Although this program is useful, it was written by the instructor of a class
- to demonstrate the writing of installable programs in languages other than
- assembler. In this case, the language is TurboPascal. This source code
- contains two interesting features: 1) the main program plus the include files
- SAVEREG.PAS and RESTREG.PAS demonstrate how to write installable software
- in TurboPascal (which is in general much easier than doing the same in assembler)
- and 2) the subroutines in WINDOW.PAS demonstrate how to open and close windows
- ala MacIntosh, although none to quickly since it was important to use BIOS calls
- rather than "break the rules" and access screen memory directly.
-
- Notes to those attempting to modify the code: 1) LASTCOM intercepts the
- BIOS interrupt 10 by transfering that address to another interrupt. Before
- doing that, however, he checks the interrupt he is about to use to make sure
- it is 0. If it is not 0, he will terminate abnormally. If the interrupt
- LASTCOM uses is already in use, a new (unused) interrupt can be used by changing
- the equates at the very beginning of the program. 2) LASTCOM MUST be run from
- the .COM file; it CANNOT be run from Turbo Pascal like a normal pascal program.
- 3) LASTCOM will work in any application which uses the BIOS interrupt 16 to input
- characters (this includes COMMAND.COM, WORDSTAR, TurboPascal itsself, and every
- other package I am aware of, with the possible exception of Lotus).
-
- This program is not trivial, but if understood the reader should be capable
- of using the same principles to write any desired resident routines. THELP
- is one particularly impressive example.