home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / LASTCOM.ZIP / LASTCOM.DOC < prev    next >
Encoding:
Text File  |  1985-08-03  |  2.8 KB  |  40 lines

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