community.borland.com

Article #15125: Patch for include file not found by Turbo Debugger

 Technical Information Database

TI125D.txt - Patch for include file not found by Turbo Debugger

Category   :Turbo Pascal
Platform   :All
Product    :

Description:

This  handout describes the patches needed  in  order  for  Turbo
Pascal version 5.0  to  generate the correct debug information so
that  a  $Include  file in a user defined unit can  be  found  by
Turbo Debugger.  Two patches  are supplied, one for TURBO.EXE and
one for  TPC.EXE.    Both  patches  should  be made using the DOS
utility, DEBUG on copies of the original .EXE files.

Notes:

   1.  DEBUG is not case sensitive to upper and lower case.   All
       addresses  are  listed  in   upper   case   for   ease  of
       readability.  All addresses are in hexadecimal.

   2.  While in DEBUG, the prompt will appear as a dash (-).

   3.  If you  do not receive the appropriate response, press "q"
       followed by  to quit.

                         TURBO.EXE Patch

   1.  Rename  TURBO.EXE  to  TURBO.BIN  (DEBUG  will  not  allow
       modifications to be made to a .EXE file.)

            Prompt>ren turbo.exe turbo.bin 

   2.  Load TURBO.BIN into DEBUG with the command:

            Prompt>debug turbo.bin 

   3.  Display the registers by entering  "r"  at  DEBUG's hyphen
       prompt.

            -r 

       The system will respond with a display of the CPU register
       values.  The following is an example:

       AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000 ...
       DS=3C23  ES=3C23  SS=3C23  CS=3C23  IP=0100  NV UP   ...

       Note  the value of the CS register.   Add  1000h  to  this
       value mentally; e.g., in the above  example  CS=3C23, then
       CS  + 1000h is 4C23.  This value  will  be  referenced  by
       ????.

   4.  At DEBUG's hyphen prompt, type:

            -a ????:A41E 

   5.  Enter the following Assembler  code  when  the  address is
       displayed:

            ????:A41E cmp si,dx 

   6.  Press  a second time.

   7.  Write the  modified code to disk by entering the following
       at the prompt:

            -w 

   8.  Quit DEBUG by entering the following:

            -q 

   9.  At the DOS prompt,  rename  the .BIN file back to the .EXE
       file with the following command:

            Prompt>ren turbo.bin turbo.exe 

                          TPC.EXE Patch

   1.  Rename   TPC.EXE   to   TPC.BIN   (DEBUG  will  not  allow
       modifications to be made to an .EXE file.)

            Prompt>ren tpc.exe tpc.bin 

   2.  Load TPC.BIN into DEBUG with the command:

            Prompt>debug tpc.bin 

   3.  At DEBUG's hyphen prompt, type:

            -a a5d3 

   4.  Enter the following Assembler  code  when  the  address is
       displayed:

            XXXX:A5D3 cmp si,dx 

   5.  Press  a second time.

   6.  Write the  modified code to disk by entering the following
       at the prompt:

            -w 

   7.  Quit DEBUG by entering the following:

            -q 

   8.  At the DOS prompt,  rename  the .BIN file back to the .EXE
       file with the following command:

            Prompt>ren tpc.bin tpc.exe 


Reference:
 

3/30/99 4:01:16 PM
 

Last Modified: 01-SEP-99