home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / modem / take.arc / TAKE.TXT < prev   
Text File  |  1988-05-28  |  21KB  |  363 lines

  1. Documentation File Take.txt   (revised 5/15/88)
  2.  
  3. >>> Take.Com <<<
  4.  
  5.    - a memory resident screen line grabber for IBM PC work-alikes
  6.         (optimized for use with terminal emulation programs)
  7.    by Mark C. Smith  version 88.5 (test version)
  8.  
  9.  
  10. Introduction
  11.      There are many of us who spend a good portion of our PC time
  12.      interacting with a remote computing network using some kind
  13.      of terminal emulator software.  Unfortunately, the terminal
  14.      emulators I use do not typically have a facility for the
  15.      re-entering lines that are still on the screen or in the
  16.      conversation buffer.  The program Take was designed to provide
  17.      line re-entry with nearly any terminal program (Take is being
  18.      tested with Window - University of Michigan, Procomm 2.4.2, and
  19.      Kermit 2.29b).
  20.  
  21.      Take is memory-resident and provides some interesting features:
  22.       - Editing of a potential re-entry line right on the screen in
  23.          the place the line appears (complete set of editing functions)
  24.       - Active indication of position and insert status using a normal
  25.          cursor.  Insert on is indicated by a full height (block-style)
  26.          cursor.
  27.       - The ability to suspend itself to pass a keystroke pressed
  28.          when Take is "popped up" that Take does not recognize.  This
  29.          allows scrolling of the communication program's text buffer
  30.          without turning Take off and back on again (by passing
  31.          Page Up and Page Down to the program, for example).  This is
  32.          probably Take's most unique and difficult feature that Take
  33.          implements on top of multiple programs using memory resident
  34.          techniques.
  35.       - Transparency to the underlying program.  Edited lines are
  36.          restored on screen, and cursor state is restored as well as
  37.          is possible.
  38.       - Facilities to turn off a resident version of Take and to
  39.          re-start a version turned off (but only one copy of Take
  40.          can be in memory, even if another is turned off).
  41.       - Tight code and fast operation. Take is written entirely in 8086
  42.          assembler, and screen read and writes are directly to video memory.
  43.       - User configuration option for all keys used by Take and for some
  44.          additional options.  This will minimize interference with other
  45.          resident programs.
  46.  
  47. How To Get Take Up And Running
  48.      Take requires an IBM compatible machine, and should run
  49.      on any PC,XT,or ATs that have a CGA,MDA,EGA,or VGA display
  50.      adapter.  Take does directly access the video display
  51.      memory, so this may cause problems in some clones (not
  52.      likely though).  It should run under DOS version 2 or
  53.      greater.  The resident portion of Take steals less
  54.      then 1900 bytes of memory (about half the code for Take
  55.      is for configuration modification/display and installation).
  56.  
  57.      Take is bundled in the .arc format, which means that it
  58.      must be unArced to be useful.  If you are reading this
  59.      documentation (take.txt) you must have already accomplished
  60.      the use of one of the arc programs to extract the files.
  61.      The files contained in the take.arc file are:
  62.          take.txt      - this brief documentation you're reading now
  63.          take.com      - a version of take configured "generically"
  64.                          (no prefix or suffixes; CGA Snow=Yes)
  65.          take_p.com    - a version of take configured for Procomm.
  66.                          (prefix=ALT-F6,suffix=ESC,CGA Snow=No)
  67.          take_w.com    - a version of take configured for Window
  68.                          (communication program of the University
  69.                           of Michigan. prefix=suffix=none,CGA Snow=No)
  70.          take_k.com    - a version of take configured for Kermit.
  71.                          (prefix=none,suffix=END,CGA Snow=No)
  72.      Note than all the _? files were made just by running take.com with
  73.       the configure option.  They are provided as a convenience and as
  74.        examples of use of the prefix and suffix sequences.
  75.  
  76.      The only file you need is one of the .com files.  I suggest copying
  77.      one of the _p,_w,_k files to take.com if you only need one of them.
  78.      The syntax for invoking Take is:
  79.          take -{option}
  80.    or    take /{option}   where {option} is one of BCDIOR (bcdior)
  81.      Action             Syntax    Effect
  82.      ------             ------    ------
  83.      install            take -i   Take is installed (memory resident) if it
  84.                                    is not already installed.  Header and
  85.                                    author contact information is displayed.
  86.      brief install      take -b   Same as i(nstall), except most messages
  87.                                    are suppressed.
  88.      display config.    take -d   Displays the current configuration of Take.
  89.                                    This mostly consists of key definitions.
  90.      configure          take -c   Invokes the interactive configuration
  91.                                    process to set keys and more.
  92.      turn off           take -o   The version of Take resident in memory
  93.                                    is disabled (effectively off).
  94.      restart (turn on)  take -r   The version of Take resident in memory
  95.                                    is re-enabled.
  96.      usage info.        take      (No option specified).  A usage message is
  97.                                    displayed.  If not installed in memory
  98.                                    yet, you will be asked if you want to
  99.                                    install Take.
  100.  
  101. Using Take
  102.      Upon installation, Take becomes memory resident and checks in
  103.      the background for the hotkey to be pressed (the default is
  104.      ALT-F9).  Typically, you will want to install Take (run with
  105.      -i or -b option) and then run your favorite terminal emulation
  106.      program.  Any time you wish to use Take to re-enter a line that
  107.      is on the screen or in the conversation buffer, press the hotkey.
  108.      As long as the video is not in a graphics mode, Take will pop up.
  109.      (Note that Take cannot and will never pop up in a graphics mode).
  110.  
  111.      Take will first send a prefix keystroke sequence to the program
  112.      currently running before popping up.  This prefix feature is for
  113.      programs such as Procomm that require some keystroke(s) to invoke
  114.      conversation buffer scroll-back mode.  (In Procomm, the prefix
  115.      is a single key: ALT-F6).  The prefix can be nothing (as for
  116.      Kermit).  Then Take will place the cursor at the beginning of
  117.      the line above the one it was last on and wait for keystrokes.
  118.      There are several general types of keys that Take handles in
  119.      different ways:
  120.  
  121.        Cancel Key (configurable, default is ESC) - Take will pass a
  122.                     suffix keystroke sequence to the program running
  123.                     underneath and then return control to that program.
  124.                     The suffix sequence is used to restore the program
  125.                     to its previous state.  (In Procomm, ESCAPE is used
  126.                     to drop out of scroll-back mode; in Kermit an END
  127.                     is used to return to the end of the conversation
  128.                     buffer).
  129.  
  130.        Grab Key (configurable, default is RETURN) - Take will pass
  131.                     the suffix keystroke sequence (see above), and then
  132.                     all of the text from the left of the line the cursor
  133.                     is on to the last non-blank character in the line.
  134.                     Presently, no trailing Return is sent at the end
  135.                     of the line.  This option may be added in the
  136.                     future.
  137.  
  138.        Editing Keys (configurable) - Take will perform an editing
  139.                     action on the cursor line.  Possible actions and
  140.                     defaults:
  141.                      Default Key      Action
  142.                      -----------      ------
  143.                      HOME             Move cursor to beginning of line
  144.                      END              Move cursor to end of line
  145.                      Left Arrow       Move cursor one position to the left
  146.                      Right Arrow      Move cursor one position to the right
  147.                      INSert           Toggle Insert/Overwrite mode
  148.                                        Insert mode is indicated by a full
  149.                                        height (block-style) cursor
  150.                      DELete           Remove the character under the cursor
  151.                      Backspace        Rubout to the left of the cursor
  152.                      Ctrl-END         Erase to end of line (from cursor right)
  153.  
  154.        Line Movement Keys (configurable) - Take restores the line the cursor
  155.                      is on, removing any changes made and moves the cursor
  156.                      up (default=Up Arrow) or down (default=Down Arrow) a
  157.                      line and to the beginning of the line.
  158.  
  159.        Other Keys (anything else!) - Take attempts to pass the key through
  160.                      to the underlying program (terminal emulator,etc.)
  161.                      so that the program can react to the key.  After the
  162.                      key is accepted by the program, Take will regain
  163.                      control and pop back up and place the cursor at
  164.                      the beginning of the screen line Take was last on.
  165.                      Between passing the keystroke and popping back up,
  166.                      any changes to an edited line are restored.  This
  167.                      tricky feature (the passing of keys Take doesn't
  168.                      itself use) allows the scrolling of the conversation
  169.                      buffer while line re-entry is taking place (much
  170.                      like some real terminals allow).  Page Up and
  171.                      Page Down in Procomm, Kermit, and Window all work
  172.                      properly.  Other terminal program functions should
  173.                      also work (the page up and down is probably the
  174.                      most obviously useful, though).
  175.  
  176. Configuring Take
  177.      Take, unlike the vast majority of PC programs, allows for complete
  178.      user configuration.  This includes the "hotkey" to pop-up take,
  179.      line editing keys, prefix and suffix keystroke sequences, and more.
  180.  
  181.      The -d option can be used to display the current
  182.      configuration and the -c option is used to begin the interactive
  183.      configuration process.  The procedure should be fairly self-
  184.      explanatory, since you are prompted for each key.  The tricky
  185.      parts involve the prefix/suffix sequences and the CGA snow question.
  186.  
  187.      Prefix and suffix sequences are emitted by Take before popping
  188.      up and after Take is done executing a re-entry operation (or is
  189.      cancelled).  The sequences can be up to 10 keystrokes in length
  190.      at present (this should be plenty for most programs, I hope).
  191.      During configuration of the suffix or prefix, you can enter any
  192.      series of keystrokes terminated by an ALT- (ALT Minus).  This
  193.      implies that ALT- itself can not be part of the sequence.  Let
  194.      me know if this is a problem, since the terminator is not at
  195.      present user-configurable.
  196.  
  197.      Take asks a "CGA with snow problem" question near the end of
  198.      the configuration process.  Answer y (for yes) if your machine's
  199.      video adapter is an original IBM CGA or a clone with the dreaded
  200.      snow problem.  If you are unsure, try Take with n (for no) and
  201.      see if the screen is filled with a snow-like pattern when you
  202.      do editing on the screen with Take popped up.  If the snow appears,
  203.      you want to say yes.  This option is only important if your
  204.      program actually runs using a CGA. It is ignored for any other
  205.      video adapter (MDA,EGA,VGA).
  206.  
  207.      At the end of the questions, you will be asked if you wish to
  208.      clone take.com onto disk.  Actually, under DOS version 3 or
  209.      greater, Take extracts the full pathname of the program you ran
  210.      and will write over that file with the newly configured version
  211.      if you respond y (for yes) to this question.  If you say n (no),
  212.      the new configuration is discarded.  Under DOS 2.x, the file
  213.      written is always take.com in the default path (since I couldn't
  214.      find a reliable way to get the actual pathname in these DOS
  215.      versions).  The file will be created if necessary.
  216.  
  217.      If you want to have different versions of Take configured for
  218.      various terminal programs, you can rename and copy the Take.com
  219.      file and then configure the copies independently, as was done for
  220.      the versions provided in the take.arc distribution file.
  221.  
  222. Using Take With Other Programs
  223.      There is no reason why Take should not work with your favorite
  224.      text editor, word processor, or any other text-mode program
  225.      except for the problems inherent in a memory resident program
  226.      interfering with the program it pops up over.  For example,
  227.      Take seems to work o.k. (not perfectly) with the Turbo Pascal
  228.      3.x editor, but calling up Take under Microsoft Word 4.0 locks
  229.      up my machine.
  230.  
  231.      The only thing you can do is configure Take as best you can
  232.      for the program and try it out.  Take is (obviously) optimized
  233.      for terminal emulation programs, since it was designed with
  234.      that use in mind.  It also should work at the DOS command prompt.
  235.  
  236. Technical Information
  237.      (This is provided only for those interested or in case Take
  238.      interferes with another memory resident program and you
  239.      might want to try to guess why).
  240.  
  241.      When Take is installed, it chains onto interrupt vector 16h
  242.      (the BIOS keyboard service routine).  Virtually all of Take's work
  243.      is done from within this service routine. Int. 16h is called by nearly all programs to request keystrokes or
  244.      status information.
  245.  
  246.      When Take is looking for the hotkey, it calls the old int 16h routine
  247.      and checks all keycodes returned to see if the hotkey is pressed. If so,
  248.      a request flag is set to indicate to Take that it should pop up at the
  249.      next available opportunity.  The hotkey is NOT extracted from the stream
  250.      of keystrokes being returned by Int. 16h, but if the hotkey is intercepted
  251.      during a keyboard status call, Take will probably pop up quickly and
  252.      absorb the hotkey itself.
  253.  
  254.      The main routine for Take is called from within int 16h also, but
  255.      it is called before the old int 16h routine checks for actual keys
  256.      (actually only when service 0 or 1 - keystroke or status is called).
  257.      If the request flags is set (or Take has been suspended), control is
  258.      passed to the main Take routine.
  259.  
  260.      When Take is operating in this main routine, it is effectively in
  261.      control and the editing and cursor control keys are active.  Int. 16h
  262.      is also used to pass a series of keystrokes to a program for the prefix,
  263.      suffix, or the text grabbed off the screen.
  264.  
  265.      It is worth noting that programs that directly take control of the
  266.      keyboard and get keystrokes via int. 9 or those that examine scan
  267.      codes returned by int. 16h will not work properly with Take.  Take makes
  268.      no attempt to calculate a scan code for ascii text sent as keystrokes
  269.      grabbed off the screen.  Take just sends a bogus scan code of 0ffh in
  270.      all cases.  Fortunately, there are very few such programs (or at least
  271.      non-memory resident ones) that seem to do either of these things.  Take
  272.      can also suspend itself in order to pass the "other" keys to an underlying
  273.      application so that scrolling of the communication buffer or any other
  274.      normal operation can be performed while Take is suspended.  This is all
  275.      accomplished with difficulty and trickery from within the same interrupt
  276.      16h, the BIOS keyboard service routine.
  277.  
  278.      Take requests keystrokes from int. 16h like most other programs,
  279.      and screen reading and writing is done directly to video display
  280.      memory for maximum speed.  Take attempts to recognize CGA,MDA, and
  281.      EGA.  VGA is treated like EGA, which should work.  Take even examines
  282.      display column width and vertical row height, and in theory will
  283.      work in EGA 43 line mode and other oddities.
  284.  
  285.      All messages and text that Take writes to the screen during the
  286.      installation process are written to DOS standard output.  This
  287.      implies that you can completely suppress the messages (if you
  288.      install Take in a batch file) by using redirection:
  289.        e.g.:   take -i >nul
  290.      Be careful though - input during configuration, etc. is obtained
  291.      NOT through DOS standard input, but by using keyboard BIOS routine
  292.      16h (as all keyboard input in Take is).
  293.  
  294.      As mentioned earlier, the present source code is a little over
  295.      1300 lines of 8086 Microsoft Masm 4.0 compatible assembler (now
  296.      being assembled with Masm 5.1).  The source code is not distributed
  297.      along with the executables for various reasons, mainly because I
  298.      don't want the program to be hacked and modified (unless I do it)
  299.      while my name is attached.  If you have a good reason to want to
  300.      see part of the source code, or just want to know how something is
  301.      done, contact me and we can work something out.
  302.  
  303. Known Problems With Take/Things To Look Out For
  304.      - Support for VGA (MCGA) has only been superficially tested.
  305.          Other video adapters and various brands of EGAs, etc. may
  306.           possibly cause problems.  I hope not, but let me know.
  307.      - Some versions of DOS may cause problems.  Take seems to have
  308.          no problems with IBM DOS 2.10 and 3.10, Zenith DOS 3.2, and
  309.          some others,  but I can't reasonable test DOS version out there.
  310.          Take relies on DOS for very little; the cloning of the program
  311.          itself is where DOS is most important.  The method I use to
  312.          find the pathname to clone to under DOS 3.x may not be a
  313.          mandated method (it doesn't work for 2.x) and may cause some
  314.          problems.
  315.  
  316. Future Desired Enhancements
  317.      - Modify the configuration routine to show the current definition,
  318.         provide an option to leave unchanged, and to modify an already
  319.         memory resident version of Take.  Fairly easy to implement, but
  320.         the configuration/display code is ugly right now and should
  321.         be cleaned up first.
  322.      - Provide a configurable option to automatically append a RETURN to
  323.         the end of a grabbed text line.  Easy to do; the most difficult
  324.         part is again the configuration.
  325.      - Provide a configurable option to display an indicator on the screen
  326.         that Take is actually active (it could change when Take is suspended
  327.         and of course disappear when Take is popped down fully).  I had this
  328.         in, but it really needs to be configurable as to where it will
  329.         appear on the screen.
  330.      - Option to uninstall.  The current "turn off" and "restart" work
  331.         to prevent conflicts with other programs you might run after ending
  332.         a terminal session, but memory is still occupied.
  333.      - Anything else anyone might request.  I am open to suggestions!
  334.  
  335. About the Author/How To Contact Me
  336.      Mark Smith is currently a senior at the University of Michigan and
  337.      will be graduating with a B.S.E. in Computer Engineering in the
  338.      summer of 1988.  He has owned a Zenith 158 XT work-alike for nearly
  339.      three years, and is now finding its 8 Mhz 8088, CGA screen, and
  340.      20 MB hard disk lacking. Primary interests are not in software, but
  341.      in hardware strangely enough, and he could never save enough time
  342.      in the course of the rest of his life using Take to re-enter lines
  343.      to balance the time spent programming it.  Other interests include
  344.      any kind of sport, reading any kind of book, and the outdoors.
  345.  
  346.      I can be reached for questions, comments, or whatever...
  347.  
  348.       via electronic mail:  mark_smith@um.cc.umich.edu
  349.  
  350.       through June, 1988:
  351.          815 S. State Street Apt. #12
  352.          Ann Arbor, Michigan 48104
  353.  
  354.       after July 1st:
  355.          2225 Shattuck Road
  356.          Saginaw, Michigan 48603
  357.  
  358.      As the program echoes, this version is free to use for any
  359.      non-commercial purpose.  In particular, any unauthorized sale,
  360.      distribution of a modified version, or distribution without
  361.      this accompanying documentation is disallowed.  When in doubt,
  362.      use your own good judgement.
  363.