home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MKEY30.ZIP / README.NOW < prev    next >
Encoding:
Text File  |  1989-08-23  |  16.2 KB  |  405 lines

  1. MASTER*KEY Ver 3.0 - Copyright 1985-1989, Larry G. Grimes  ALL RIGHTS RESERVED
  2.  
  3. 08/23/89  SHARPE SYSTEMS CORPORATION               
  4.           2320 'E' Street
  5.           La Verne, CA 91750
  6.           (714) 596-0070
  7.  
  8.  
  9. ------------->     NOTE 1: ***  NEW DATA SEPARATION INFORMATION  ***
  10.                    
  11.                    MASTER*KEY's MIXED-MODE (combination of code and data,
  12.                    "DB's") is ONLY output AFTER the Branch Addresses have
  13.                    been loaded (-L from command line, or #1 from
  14.                    Miscellaneous Menu, #5 from Main Menu).
  15.  
  16.                    To allow for creating the largest possible file
  17.                    without "Symbol not found" errors, if Branch Addresses
  18.                    have been loaded, MASTER*KEY will often assume some
  19.                    short branches (i.e. JNZ) may be data. These lines
  20.                    will be marked with "MASM_Syntax_Error" messages and
  21.                    be commented out with a DB line underneath. If these
  22.                    are valid branches, you may want to edit out the DB
  23.                    lin  or remoe MASM optimization with -M on the
  24.                    command line.
  25.  
  26.                    Its best to use MKDATA.EXE to patch in most of your
  27.      o           data areas after you have your desired source file.
  28.  
  29.                    
  30.                    NOTE 2: If your computer is not completely IBM PC BIOS
  31.                    Compatible or Master*Key will not run on your computer,
  32.                    use the -Q1 argument from the command line. This
  33.                    possibly applys to the Tandy 2000, NEC, Wang. etc.
  34.                    (mk3 filespec.ext -q1), refer to the rest of the
  35.                    readme file and manual. You may also want to try
  36.                    different screen colors and video attributes.
  37.  
  38.  
  39.                    NOTE 3: Get Microsoft's (R) 'MS-DOS Encyclopedia' and
  40.                    Thom Hogan's 'The Programmer's PC Sourcebook' both
  41.                    published by Microsoft Press. MASTER*KEY Version 3.0
  42.                    with MASM 5.1 with these two books are all you need
  43.                    to disassemble almost anything. You may also need a
  44.                    good book on assembly language in addition to the
  45.                    MASM manuals. The 'Visible Computer Assembly Language
  46.                    Teaching System' by Software Masters is highly
  47.                    recommended for novices.
  48.  
  49.  
  50.                    NOTE 4: Batch files are included to automatically
  51.                    process COMMAND.COM from Drive C:, and 32K and 64K
  52.                    BIOS from memory. (mkcmdcom.bat, mkbios32 & 64.bat).
  53.                    Alter these to use from a different drive, different
  54.                    bios size, or different bios location.
  55.  
  56.  
  57.                    NOTE 5: When disassembling an entire EXE file, make
  58.                    sure you use -B0 on the command line. If you don't
  59.                    do this the disassembly will begin at the program's
  60.                    entry point (CS:IP).
  61.  
  62.  
  63.  
  64.  
  65.  
  66. -----------------------------------------------------------------------
  67.  
  68. MASTER*KEY Ver 3.0
  69.  
  70. COMMAND LINE:  mk3 filespec [-argument -argument...]
  71.  
  72. Optional Arguments: * = (new to version 3.0)
  73.  
  74.      -A<filespec> *APPEND to Output File Name, to be used by MASTER*KEY
  75.                     cross-reference, it must have the extension: .DIS.
  76.                     There is no interactive mode when outputting from
  77.                     the command line.
  78.  
  79.  
  80.      -B<hex#>      BEGINNING OFFSET. Sets the offset to start disas-
  81.                    sembling, rather than the default 100h for .COM
  82.                    and the (code segment *16) + instruction pointer
  83.                    for .EXE files. Can be up to 5 hexadecimal digits.
  84.  
  85.  
  86.      -CC           Output ALL CODE (similar to MS-DOS debug).
  87.  
  88.  
  89.      -CD           Output ALL DATA.
  90.  
  91.  
  92.      -CI           Output EXCEPTIONS ONLY (funcs, int's, sgmt chgs).
  93.  
  94.  
  95.      -CB           Output BRANCH LABELS Only.
  96.  
  97.  
  98.      -CR           Output DATA REFERENCES Only.
  99.  
  100.  
  101.      -CO           Output DATA ONLY (just the DB's in the file).
  102.  
  103.  
  104.      -E<hex#>      ENDING OFFSET. Sets the offset to stop disas-
  105.                    sembling, rather than the default end of file.
  106.                    Can be up to 5 hexadecimal digits.
  107.  
  108.  
  109.      -H<hex#>      CODE ORIGIN or PSP HEADER SIZE. Changes the default
  110.                    PSP size of 100h for non-EXE files such as device
  111.                    drivers, code fragments, and programs loaded at
  112.                    static locations. You may use DEBUG to break a
  113.                    large file into several smaller files and use the
  114.                    code origin of each file to maintain correct
  115.                    addressing.
  116.  
  117.  
  118.      -L           *LOAD BRANCH ADDRESS Array. It is a good idea to use
  119.                    this flag if you need to reference all of the branch
  120.                    locations, since it takes some time to accomplish.
  121.                    Three different passes are made through the file
  122.                    to remove most of the "Symbol not found" errors.
  123.                    Most of the remaining errors are probably in data
  124.                    areas. Either edit the file or patch in a block of
  125.                    data created by MKDATA.
  126.  
  127.  
  128.      -M           *Turn OFF MASM Optimizations & Syntax Errors (DB's).
  129.                    MASM will optimize some of the code and some opcodes
  130.                    have several hex values. Not using this argument
  131.                    will make the reassembled file exactly as the original.
  132.  
  133.  
  134.      -O<string>    OUTPUT FILE Name, to be used by the MASTER*KEY cross-
  135.                    reference, it must have the extension: .DIS. There is
  136.                    no interactive mode when outputting from the command
  137.                    line.
  138.  
  139.  
  140.      -P           *PRINTER OUTPUT from Command Line. An extra carriage
  141.                    return is output to be compatible with most printers.
  142.                    If your printed output is double spaced, use -P1;
  143.                    
  144.  
  145.      -P1          *PRINTER OUTPUT without extra CARRIAGE RETURN.
  146.  
  147.  
  148.      -Q<0-2>       VIDEO BIOS selection (for Non-IBM Compatibles):
  149.  
  150.                    0 = Write Screen Display directly to Video memory.
  151.                        Default & fastest. If your computer is not
  152.                        completely IBM video-graphics BIOS compatible,
  153.                        you may need to use Q1 or Q2.
  154.  
  155.                    1 = Do not use Video BIOS (extremely slow).
  156.                        Screen output is completely software emulated.
  157.  
  158.                    2 = Use Video BIOS, but remove snow (somewhat slower).
  159.                        The screen refresh is slowed down.
  160.  
  161.  
  162.      -T<0-9>       Change Tab Spacing on output to file or printer.
  163.                    The default value is 8. Tab Characters are used to
  164.                    fill large blank areas on the listings and keep
  165.                    file sizes to a minimum. If your printer does not
  166.                    recognize tabs, the output will not be aligned
  167.                    properly. Also, your editor may have different
  168.                    spacing for tabs (C programmers tend to use 3 or
  169.                    4). The default value is 8.  An entry of -T or -T0
  170.                    will disable tab characters completely.  You may
  171.                    have to disable tabs with some non-IBM compatible
  172.                    printers.
  173.  
  174.  
  175.      -V            If your computer doesn't seem to be Video Display
  176.                    compatible with MASTER*KEY, -V with no arguments
  177.                    will attempt to interpret the given display colors
  178.                    and attributes. If the result isn't satisfactory,
  179.                    use VA or VC. These arguments are for true IBM-
  180.                    compatibility (you may need to experiment with
  181.                    different combinations to achieve the desired
  182.                    display colors and attributes, also refer to your
  183.                    technical reference manual):
  184.  
  185.      MASTER*KEY IBM-PC Video Display Colors:
  186.  
  187.           Color   Hex Value
  188.  
  189.           Black      0h
  190.           Blue       1h
  191.           Green      2h
  192.           Cyan       3h
  193.           Red        4h
  194.           Magenta    5h
  195.           Yellow     6h
  196.           White      7h
  197.  
  198.      
  199.      MASTER*KEY IBM-PC Video Display Attributes
  200.  
  201.           Color Display:
  202.  
  203.           Attribute                Hex Value    Binary Mask
  204.  
  205.           Normal                      0h           0000b
  206.           Reverse                     1h           0001b
  207.           Bright                      2h           0010b
  208.           Reverse Bright              3h           0011b
  209.           Blink                       4h           0100b
  210.           Reverse Blink               5h           0101b
  211.           Bright Blink                6h           0110b
  212.           Reverse Bright Blink        7h           0111b
  213.  
  214.      Monochrome Display:
  215.  
  216.           Attribute                Hex Value    Binary Mask
  217.  
  218.           Normal                      0h           0000b
  219.           Reverse                     1h           0001b
  220.           Bright                      2h           0010b
  221.           Blink                       4h           0100b
  222.           Reverse Blink               5h           0101b
  223.           Bright Blink                6h           0110b
  224.           Reverse Bright Blink        7h           0111b
  225.           Underline                   8h           1000b
  226.           Underline Bright            Ah           1010b
  227.           Underline Blink             Ch           1100b
  228.           Underline Bright Blink      Eh           1110b
  229.  
  230.  
  231.      -VA<2hex#'s>  Two hex digits for Display Attributes: 1-normal
  232.                    and 2-alternate (default: high-intensity).
  233.  
  234.  
  235.      -VC<4#'s>     Four hex digits for Display & Border colors:
  236.                    1-foreground (text), 2-background, 3-alternate
  237.                    foreground (enhanced), and 4-border.
  238.  
  239.  
  240.  
  241.  
  242. -----------------------------------------------------------------------
  243.  
  244. MASTER*KEY'S Version 3.0 BINARY COMPARISON PROGRAM
  245.  
  246.                    MKCOMP will compare any two files binarily. This will
  247.                    help you create a file exactly as the original. EXE
  248.                    headers are ignored, so you can compare a COM file
  249.                    with an EXE file without having to use EXE2BIN. You
  250.                    can determine branch location changes by single
  251.                    differences. You know when there is a difference in
  252.                    the files when every location is different. Edit
  253.                    your source disassembly file with DB's to fix all
  254.                    of the differences before trying to change the file.
  255.                    
  256.                    ***  CAUTION!  ***
  257.                    
  258.                    Since EXE headers are ignored, DO NOT run a newly
  259.                    created EXE program until the CODE SEGMENT and
  260.                    STACK SEGMENT is correct in the header. Use MKHEADER
  261.                    and Microsoft's (R) EXEMOD programs.
  262.  
  263. COMMAND LINE:
  264.  
  265.     mkcomp filespec1 filespec2 [-argument] [>out_filespec]
  266.  
  267.                    Filespec1 is the original file.
  268.                    Filespec2 is the correctly reassembled file.
  269.                    Out_filespec will save the output into a file.
  270.  
  271. Optional Argument:
  272.  
  273.      -H<hex#>      CODE ORIGIN or PSP HEADER SIZE. Changes the default
  274.                    PSP size of 100h for non-EXE files such as device
  275.                    drivers, code fragments, and programs loaded at
  276.                    static locations. You may use DEBUG to break a
  277.                    large file into several smaller files and use the
  278.                    code origin of each file to maintain correct
  279.                    addressing. (Same as MK3.EXE).
  280.  
  281.  
  282.  
  283.  
  284. -----------------------------------------------------------------------
  285.  
  286. MASTER*KEY'S Version 3.0 DATA EXTRACTION PROGRAM
  287.  
  288.                    MKDATA will create assembly language compatible code
  289.                    in data form from any file. MKHEADER's list of relo-
  290.                    catable items will help you find data segments in EXE
  291.                    programs. These large areas of data should be created
  292.                    using MKDATA instead of MK3. The -X argument will filter
  293.                    out most of the data so you will have a place to begin
  294.                    looking for data.
  295.  
  296.  
  297. COMMAND LINE:
  298.  
  299.        mkdata filespec [-argument -argument...]
  300.  
  301. Optional Arguments:
  302.  
  303.      -A<filespec>  APPEND to Output File Name, to be used by MASTER*KEY
  304.                     cross-reference, it must have the extension: .DIS.
  305.                     There is no interactive mode when outputting from
  306.                     the command line. (Same as MK3).
  307.  
  308.  
  309.      -B<hex#>      BEGINNING OFFSET. Sets the offset to start disas-
  310.                    sembling, rather than the default 100h for .COM
  311.                    and the (code segment *16) + instruction pointer
  312.                    for .EXE files. Can be up to 5 hexadecimal digits.
  313.                    (Same as MK3).
  314.  
  315.  
  316.      -D            Turn DUPS() output OFF. This will turn DUPS()
  317.                    psuedops into DW's for data labeling.
  318.  
  319.  
  320.      -E<hex#>      ENDING OFFSET. Sets the offset to stop disas-
  321.                    sembling, rather than the default end of file.
  322.                    Can be up to 5 hexadecimal digits. (Include
  323.                    PSP header size). (Same as MK3).
  324.  
  325.  
  326.      -H<hex#>      CODE ORIGIN or PSP HEADER SIZE. Changes the default
  327.                    PSP size of 100h for non-EXE files such as device
  328.                    drivers, code fragments, and programs loaded at
  329.                    static locations. You may use DEBUG to break a
  330.                    large file into several smaller files and use the
  331.                    code origin of each file to maintain correct
  332.                    addressing. This argument can help keep code with
  333.                    labels the same as DEBUG. (Same as MK3).
  334.  
  335.  
  336.      -O<filespec>  Output File (file must not exist).
  337.  
  338.  
  339.      -T<0-9>       Change Tab Spacing on output to File.
  340.  
  341.  
  342.      -W1           OUTPUT code in ALL DB's.
  343.  
  344.  
  345.      -W2           OUTPUT code in ALL DW's on EVEN Word Boundary. This
  346.                    is the default. Most data words are on an even
  347.                    word boundary beginning with 0;
  348.  
  349.  
  350.      -W3           OUTPUT code in ALL DW's on ODD Word Boundary.
  351.  
  352.  
  353.      -W4           OUTPUT code as data with NO DW's.
  354.  
  355.  
  356.      -X            Output DATA ONLY (ignore most code areas). This
  357.                    is a filter to find the approximate areas of data.
  358.  
  359.  
  360.  
  361.  
  362. -----------------------------------------------------------------------
  363.  
  364. MASTER*KEY'S Version 3.0 EXE HEADER PROGRAM
  365.  
  366.                    MKHEADER will display EXE header information including
  367.                    relocatable items. The relocatable items are locations
  368.                    in the EXE file where the address of the end of the
  369.                    PSP is added for multiple segments. These locations
  370.                    will help you determine different segment areas for
  371.                    separate disassembly, both code and data. Use
  372.                    Microsoft's (R) EXEMOD program to change EXE headers.
  373.  
  374.  
  375. COMMAND LINE:
  376.  
  377.     mkheader filespec[.EXE] [-argument] [>out_filespec]
  378.  
  379. Optional Argument:
  380.  
  381.      -X            DO NOT Print Relocation Addresses. Sometimes a large
  382.                    program will have several hundred items.
  383.  
  384.  
  385.  
  386.  
  387. -----------------------------------------------------------------------
  388.  
  389. MASTER*KEY'S Version 3.0 CROSS-REFERENCE PROGRAM
  390.  
  391.                    MKXREF will organize MK3 source files into a
  392.                    sequential reference for branch labels, data locations,
  393.                    MASM syntax errors, functions, interrupts, and
  394.                    potential trouble spots. If you run out of memory,
  395.                    output different -C options from MK3 and create an
  396.                    .XRF file for each, or use your text editor or word
  397.                    processor to break a large file into individual
  398.                    segment files. The author uses and recommends Solution
  399.                    Systems 'BRIEF'.
  400.                    
  401.  
  402. COMMAND LINE:
  403.  
  404.     mkxref filespec[.DIS]       (creates a filespec.xrf file).
  405.