home *** CD-ROM | disk | FTP | other *** search
/ Best Objectech Shareware Selections / UNTITLED.iso / boss / util / misc / 008 / tmed.doc next >
Encoding:
Text File  |  1993-03-30  |  13.9 KB  |  298 lines

  1.  
  2.  
  3.  
  4.   TMED is copyrighted 1992 by Liang Chen. No portion of this program may be
  5.   reproduced without the written permission of Liang Chen. It is FREE. Good
  6.   suggestion for major enhancement from the user are welcomed.
  7.  
  8.   STANDARD DISCLAIMERS: THE COPYRIGHT HOLDER OFFERS NO WARRANTY WITH THIS
  9.   PROGRAM WHATSOEVER. NEITHER SHALL HE BE LIABLE FOR DAMAGES OF ANY KIND
  10.   THAT MAY ARISE FROM ITS USE.
  11.  
  12.  
  13.  
  14.  
  15.                                  INTRODUCTION
  16.  
  17.   TMED is a TSR memory editor which takes less 8k memory when is loaded.
  18.   It can be used as an auxiliary debugging tool for programmers, or
  19.   sometime as a gamebuster. TMED can view what is in the memory and edit
  20.   the memory while other programs are running. TMED works great with Turbo
  21.   Debugger.
  22.  
  23.   TMED versions after 1.20 come with a key macro function. Since TMED is
  24.   resident in the memory, this key macro function may be used for any
  25.   other foreground running programs. But if the foreground programs also
  26.   hook to the INT08, INT09 handlers and use it heavily, the time delay
  27.   by the foreground program may cause problems for the macro function.
  28.   This is because a BIOS problem that some keys are overwritten before
  29.   it can be read.
  30.  
  31.  
  32.   WARNING:  TMED is not bug proof. The system may halt due to an
  33.             improper operation (such as editing or loading in critical
  34.             memory area, set wrong breakpoints, enter wrong data,
  35.             etc.). It will not work for some programs. You have to try
  36.             to see if it works under certain programs. Not all people
  37.             will benefit from this program. You have to know something
  38.             about the computer in order to make full use of it.
  39.  
  40.  
  41.                                   OPERATION
  42.  
  43.   LOADING:
  44.  
  45.             Enter 'TMED' at DOS prompt, then press <RETURN>.
  46.  
  47.  
  48.   INVOCATION:
  49.  
  50.             There are two ways to invoke the TMED, a) Hotkey: press left
  51.             <Ctrl> key twice; b) Breakpoint; it will pause and invoke
  52.             TMED when DOS runs to breakpoint (See how to set breakpoint
  53.             in the following instructions). If the invocation is
  54.             successful, TMED will display a memory page (256 bytes) in
  55.             hex and ascii codes and the command options.
  56.  
  57.             (Try to run TMED as a TSR now and activate it (press the
  58.             left <Ctrl> key twice) while you are reading this file. It
  59.             will help you understand the following commands.)
  60.  
  61.  
  62.   KEY MACRO FUNCTIONS:
  63.  
  64.             Macro function may be used any time when the TMED is in
  65.             resident. The macro buffer are big enough for 192 keys.
  66.  
  67.             Press Mky1 (default F11 key) once to record the key macro
  68.             (you will hear a short sound). Press F11 again will end
  69.             macro recording mode (you will hear a longer sound).
  70.  
  71.             Press Mky2 (default F12 key) will execute the key macro.
  72.             There is no time delay while executing the key macro.
  73.  
  74.             If you press Mky2 key while macro is in recording mode, then
  75.             it is a recursive macro. For example, you can let a
  76.             recursive macro continuously turns page for you. While
  77.             a recursive macro is executing, press any key will stop the
  78.             macro running.
  79.  
  80.             Mky1 and Mky2 may be assigned to other keys (see below), in
  81.             case these keys are used by the foreground running programs.
  82.  
  83.  
  84.   COMMANDS:
  85.             Commands are invoked by pressing the <Alt> key with the upper
  86.             case letter in the command option line.
  87.  
  88.  
  89.       TMED: <Alt>-T will display the TMED data segment. The cursor will
  90.             be placed at the first byte of the string input buffer. To
  91.             reduce the size of TMED, some data are entered by editing
  92.             the corresponding memory addresses in the data segment.
  93.             Useful information shown in this page and next page are:
  94.  
  95.                   Mode:XBodc:X        Editing mode and screen board
  96.                                           color.
  97.                                           May be changed by editor.
  98.  
  99.                   Txtc:XHilc:X        Text color and highlight
  100.                                           color. highlight color are
  101.                                           used to display bytes in
  102.                                           memory that are different from
  103.                                           the saved buffer or dumped
  104.                                           file. The saved memory buffer
  105.                                           is 256 bytes (a page). May be
  106.                                           changed by editor.
  107.  
  108.                   Swpg:XSwmd:X        Switch page and video mode
  109.                                           when TMED is invoked. TMED
  110.                                           will try to work in different
  111.                                           video page. If it does not
  112.                                           work normally, try different
  113.                                           Txtc, Hilc, Swpg. TMED does
  114.                                           not save the original screen.
  115.                                           After quit TMED, programs will
  116.                                           operate as before the popup.
  117.                                           But the graphic display and
  118.                                           colors may be changed. May be
  119.                                           changed by editor.
  120.  
  121.  
  122.                                           NOTE: AFTER CHANGING THE SWPG,
  123.                                           ALL DISPLAY WILL OUTPUT TO THE
  124.                                           NEW PAGE. YOU SHOULD QUIT
  125.                                           EDITOR MODE AND TMED, THEN
  126.                                           POPUP AGAIN.
  127.  
  128.                   Odpg:XOdmd:X        Old video mode and page before
  129.                                           popup. Please do not change it.
  130.  
  131.                   Endc:XWldc:X        The ending char and the wild
  132.                                           char in the search string. By
  133.                                           default, ending char is hex
  134.                                           00; wild char is hex FF. For
  135.                                           example, to find
  136.  
  137.                                                instruction        hex
  138.  
  139.                                                cmp     al,XX      3C XX
  140.                                                jne     XX         75 XX
  141.  
  142.                                           the search string may be
  143.                                           entered as (in hex)
  144.  
  145.                                                3C FF 75 00
  146.  
  147.                                           Endc and Wldc may be changed
  148.                                           by editor.
  149.  
  150.                   Ustc:XCsrc:X        Unset breakpoint byte and
  151.                                           cursor color. By default, Ustc
  152.                                           is hex 'CD' (hex code for
  153.                                           interrupt 'int'); May be
  154.                                           changed by editor.
  155.  
  156.  
  157.                   AX= XXBX= XX        The register values before popup
  158.                   CX= XXDX= XX        or breakpoint.
  159.                   SI= XXDI= XX
  160.  
  161.                   CS= XXIP= XX        CS:IP, next instruction address
  162.                                           after breakpoint pause.
  163.  
  164.                   Line of input:        16 bytes string buffer for 'Find'
  165.                   XXXXXXXXXXXXXXXX        command. Using editor
  166.                                           to change the string.
  167.  
  168.                                (next memory page)
  169.  
  170.                   Seg1XXSeg2XX        Search start and end segment
  171.                                           addresses. By default, Seg1 is
  172.                                           set to the top memory address of
  173.                                           TMED; Seg2 is set to A000, ie.,
  174.                                           the top of the conventional
  175.                                           memory.
  176.                                           May be changed by editor.
  177.  
  178.                   GadrXXPadrXX        Current and previous addresses.
  179.                   DadrXXJadrXX        Memory dump and relative jump
  180.                                           start addresses.
  181.                                           May be changed by editor.
  182.  
  183.                   Mky1XXMky2XX        Scan codes of Mky1 and Mky2.
  184.                                           May be changed to other keys by
  185.                                           the editor.
  186.  
  187.                   MadrXXKadrXX        Memory and KeyMacro buffer
  188.                                           addresses.
  189.  
  190.                   KnumXXSflgXX        Knum = Macro key number.
  191.                                           Sflg = sound flag.
  192.                                                = 0      sound off
  193.                                                = 1      sound on (default)
  194.                                           May be changed by editor.
  195.  
  196.                   SnhiXXSnlwXX        Beep sound high and low tones.
  197.                                           May be changed by editor.
  198.  
  199.                   DmpfXXXX.XXX           ASCIIZ dump file name.
  200.                                           May be changed by TMED editor.
  201.  
  202.       You may find other variables in the TMED data area. But these data
  203.       are not explained and marked. You are supposed not to change them.
  204.  
  205.       ALPHA/HEX MODE:  <Alt>-A/<Alt>-H will Change the editing modes.
  206.  
  207.       EDIT:       Invoke the alpha/hex memory editor to edit current
  208.                   memory page (not ROM). <ESC> or <ENTER> to quit edit
  209.                   mode. Using direction keys to move cursor. Press
  210.                   <Alt>-A/<Alt>-H will Change the editing modes while
  211.                   editing.
  212.  
  213.  
  214.       FIND/NEXT:  <Alt>-F will find the first string that you entered in
  215.                   the search string buffer between the memory addresses
  216.                   of Seg1 and Seg2. <Alt>-N will find the next string.
  217.  
  218.  
  219.       GOTO/JUMP/PREVIOUS: <Alt>-G will read a new segment address from
  220.                   the keyboard (in hex, no echo), then go to the new
  221.                   address; <Alt>-J will read a relative jump address
  222.                   from the keyboard (in hex, no echo), then jump to the
  223.                   new address. The actual address is affected by the
  224.                   base address saved in Jadrs; <Alt>-P will goto
  225.                   previous address.
  226.  
  227.       DUMP/COMPARE/MORE: <Alt>-D will dump 64k (256 pages) memory start
  228.                   from current page to the dump file; <Alt>-C will enter
  229.                   the comparing mode and compare the dump file with the
  230.                   current memory. The changed memory bytes are displayed
  231.                   in highlight color; <Alt>-M will move to next page
  232.                   that has changes; <Alt>-C again will quit comparing
  233.                   mode.
  234.  
  235.       CONVERT:    Convert decimal number ( < 65535 ) at the string
  236.                   buffer to hex code. Useful when try to find the stored
  237.                   game score addresses and cheat the game.
  238.  
  239.       KEYCODE:    <Alt>-K once, the string buffer will display the scan
  240.                   code of any key input that follows. <Alt>-k again will
  241.                   exit. Macro recording in this mode will just record
  242.                   the keystrokes.
  243.  
  244.       RESTORE:    Restore the byte at current cursor position from the
  245.                   memory buffer to the memory.
  246.  
  247.       SETBREAKPOINT/IP: <Alt>-S will set the break point at current
  248.                   cursor position; <Alt>-I will goto the breakpoint that
  249.                   invoked TMED. The breakpoint byte may also be changed
  250.                   by the editor. Tips for activating TMED when play
  251.                   games: if hotkey works, fine; if hotkey does not work,
  252.                   use a binary editor put 'CC' in the game executable
  253.                   file (be sure you keep a copy of it).
  254.  
  255.                   Please note that if the breakpoint you set is not the
  256.                   first byte of an executable instruction, unpredictable
  257.                   results will be seen as program execution passes
  258.                   through the breakpoint. A breakpoint in a ROM area
  259.                   will not operate since instructions in ROM cannot be
  260.                   replaced with a breakpoint instruction.
  261.  
  262.                   When Turbo Debugger is running, the breakpoints set by
  263.                   TMED will like the breakpoints set by Turbo Debugger.
  264.                   But You have to restore the original codes before
  265.                   executing following instructions.
  266.  
  267.       Update:     <Alt>-U will update the current memory page.
  268.  
  269.       LOAD:       <Alt>-R will restore the dumped memory region from the
  270.                   dumped file.
  271.  
  272.       Boot:       <Alt>-B will do a warm boot.
  273.  
  274.       Quit:       <Alt>-Q will quit TMED.
  275.  
  276.       (Operation):<Alt>-O will toggle between the foreground mode and
  277.                   background operation mode. There is no screen output
  278.                   in a background operation mode, but all other command
  279.                   options are still available when TMED is invoked. This
  280.                   mode is useful when the foreground running programs is
  281.                   in graphic mode and you do not want destroy the screen.
  282.  
  283.  
  284.                                ACKNOWLEDGEMENT
  285.  
  286.       The original TSR shell I used for TMED was written by Thomas
  287.       Brandenborg (filename TSRDEMO2.ARC on simtel20 site). His copyright
  288.       and address are included below
  289.  
  290.             Copyright 1987 by Thomas Brandenborg. All Rights Reserved.
  291.  
  292.              Thomas Brandenborg
  293.              Lundbyesgade 11
  294.              DK-8000 Aarhus C
  295.              DENMARK
  296.  
  297.  
  298.