home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol6n20.zip / INLINE.ZIP / UNINLINE.DOC < prev    next >
Text File  |  1986-10-07  |  5KB  |  199 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                      October 6, 1986
  9.  
  10.                         UNINLINE--AN INLINE DISASSEMBLER
  11.                                    Version 1.0
  12.  
  13.  
  14.         OVERVIEW
  15.  
  16.         UNINLINE.COM is a disassembler which accepts an 'object' file 
  17.         consisting of Turbo Pascal (tm) Inline statements and produces an 
  18.         assembly language source file.  The source file may then be 
  19.         modified and reassembled to Inline statements using INLINE.COM.
  20.  
  21.         Figure 1 shows an Inline statement input file and Figure 2, the 
  22.         resulting source code disassembly.
  23.  
  24.  
  25.         LOADING AND RUNNING UNINLINE
  26.  
  27.         First create a COM file, UNINLINE.COM, by compiling UNINLINE.PAS 
  28.         using the Turbo Pascal compiler.  The files UNPARS.INC and 
  29.         FLPT.INC are also required for compilation.  The normal default 
  30.         memory settings are suitable.
  31.  
  32.         UNINLINE is called at the DOS prompt with two filename parameters 
  33.         specifying the names of the object and source files.  If no 
  34.         extensions are given, .OBJ and .ASM are used by default.  For 
  35.         instance,
  36.  
  37.           UNINLINE ABC DEF
  38.  
  39.         will cause UNINLINE to look for an object file, ABC.OBJ, and 
  40.         create a source file DEF.ASM.  Files with no extension may be 
  41.         input or created by using a simple '.' for the extension.
  42.  
  43.         If the second filename is missing from the command line, an ASM 
  44.         file will be created using the same name as the object file.  If 
  45.         neither filename is specified, then names will be requested once 
  46.         execution starts.
  47.  
  48.         Once execution begins, UNINLINE will run to completion with the 
  49.         only console output being error messages.
  50.  
  51.  
  52.         OPERATION
  53.  
  54.           1. UNINLINE should accept any syntax within an Inline statement 
  55.              which is acceptable by Turbo Pascal.  Disassembly starts 
  56.              with the word 'Inline' and ends with the ending ')'.  
  57.              Intervening Pascal comments are ignored.  Thus it is 
  58.              possible to digest an entire Pascal source file processing 
  59.              only the Inline statements.
  60.  
  61.  
  62.                                    1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.           2. The source code instructions resulting from each Inline 
  76.              statement are separated by the pseudo-instruction, NEW.  
  77.              When reassembled using INLINE.COM, the NEW instruction 
  78.              causes separate Inline statements to be generated.
  79.  
  80.           3. Labels are inserted in the assembly language source code as 
  81.              required.  Labels consist of the letter, X, and a decimal 
  82.              number which is the number of bytes from the start of the 
  83.              disassembly.  Labels are only inserted on those instructions 
  84.              which are the destination of a jump or call.
  85.  
  86.  
  87.  
  88.  
  89.         (C) Copyright 1985,86 by L. David Baldwin.
  90.  
  91.         UNINLINE may be copied and distributed freely providing that no 
  92.         fee is charged and it is not part of a package for which a charge 
  93.         is made.
  94.  
  95.         Please report all bugs, suggestions, and problems to Dave 
  96.         Baldwin, CompuServe ID #76327,53.
  97.  
  98.              22 Fox Den Rd., (Summer)     144 13th St. East,  (Winter)
  99.              Hollis, NH 03049             Tierra Verde, FL 33715
  100.              (603) 465-7857               (813) 867-3030
  101.  
  102.  
  103.              Turbo Pascal is a trademark of Borland International Inc.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                    2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.         Inline($FC/$8A/$46/<CH/$8B/$4E/<LIMIT/$09/$C9/$9C/$79/$03/$F7
  145.           /$D9/$FD/$89/$CA/$C4/$7E/<T/$F2/$AE/$75/$01/$41/$29/$CA/$9D
  146.           /$79/$02/$F7/$DA/$89/$56/$0C);
  147.  
  148.  
  149.                       Figure 1: Inline Statement Input File
  150.  
  151.  
  152.  
  153.               CLD
  154.               MOV     AL,[BP+<CH]
  155.               MOV     CX,[BP+<LIMIT]
  156.               OR      CX,CX
  157.               PUSHF
  158.               JNS     X15
  159.               NEG     CX
  160.               STD
  161.         X15:  MOV     DX,CX
  162.               LES     DI,[BP+<T]
  163.               REPNE
  164.               SCASB
  165.               JNZ     X25
  166.               INC     CX
  167.         X25:  SUB     DX,CX
  168.               POPF
  169.               JNS     X32
  170.               NEG     DX
  171.         X32:  MOV     [BP+$0C],DX
  172.                 
  173.  
  174.                        Figure 2:  Disassembled Output File
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                    3
  195.  
  196.  
  197.  
  198.  
  199.