home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI456.ASC < prev    next >
Encoding:
Text File  |  1989-05-30  |  3.4 KB  |  128 lines

  1. STYLE TopMargin 2.8 Inch,BottomMargin 1 Inch,HeaderSpacing .6 Inch
  2. PAGEFOOTING
  3. BEGIN PAGEHEADING
  4. PRODUCT  :  TURBO PASCAL@>( )NUMBER  :  456
  5. VERSION  :  5.0
  6.      OS  :  MS-DOS, PC-DOS
  7.    DATE  :  MARCH 10, 1989@>( )PAGE  :  @value(page)/3
  8.  
  9.   TITLE  :  PATCH FOR INCLUDE FILE NOT FOUND BY TURBO DEBUGGER
  10. END PAGEHEADING
  11. BEGIN HEADERT
  12. PRODUCT  :  TURBO PASCAL@>( )NUMBER  :  456
  13. VERSION  :  5.0
  14.      OS  :  MS-DOS, PC-DOS
  15.    DATE  :  MARCH 10, 1989@>( )PAGE  :  @value(page)/3
  16.  
  17.   TITLE  :  PATCH FOR INCLUDE FILE NOT FOUND BY TURBO DEBUGGER
  18. END HEADERT
  19. This handout describes the patches needed in order for Turbo
  20. Pascal version 5.0 to generate the correct debug information so
  21. that a $Include file in a user defined unit can be found by 
  22. Turbo Debugger.  Two patches are supplied, one for TURBO.EXE and
  23. one for TPC.EXE.  Both patches should be made using the DOS
  24. utility, DEBUG on copies of the original .EXE files.
  25.  
  26. Notes:BEGIN NUMBERED
  27. DEBUG is not case sensitive to upper and lower case.  All
  28. addresses are listed in upper case for ease of readability.  All
  29. addresses are in hexadecimal.
  30.  
  31. While in DEBUG, the prompt will appear as a dash (-).
  32.  
  33. If you do not receive the appropriate response, press "q"
  34. followed by <Return> to quit.  
  35. END NUMBERED
  36.  
  37. -----------------------------------------------------------------
  38.  
  39. TURBO.EXE Patch
  40.  
  41. BEGIN NUMBERED
  42. Rename TURBO.EXE to TURBO.BIN (DEBUG will not allow modifications
  43. to be made to a .EXE file.)
  44.  
  45.         Prompt>ren turbo.exe turbo.bin <Return>
  46.  
  47. Load TURBO.BIN into DEBUG with the command:
  48.  
  49.         Prompt>debug turbo.bin <Return>
  50.  
  51. Display the registers by entering "r" at DEBUG's hyphen prompt.
  52.  
  53.         -r <Return>
  54.  
  55.     The system will respond with a display of the CPU register
  56. values.  The following is an example:
  57.  
  58.     AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000 ...
  59.     DS=3C23  ES=3C23  SS=3C23  CS=3C23  IP=0100  NV UP   ...
  60.  
  61.     Note the value of the CS register.  Add 1000h to this value
  62. mentally; e.g., in the above example CS=3C23, then CS + 1000h is
  63. 4C23.  This value will be referenced by ????.
  64.  
  65. At DEBUG's hyphen prompt, type:
  66.  
  67.         -a ????:A41E <Return>
  68.  
  69. Enter the following Assembler code when the address is displayed:
  70.  
  71.         ????:A41E cmp si,dx <Return>
  72.  
  73. Press <Return> a second time.
  74.  
  75. Write the modified code to disk by entering the following at the
  76. prompt:
  77.  
  78.         -w <Return>
  79.  
  80. Quit DEBUG by entering the following:
  81.  
  82.         -q <Return>
  83.  
  84. At the DOS prompt, rename the .BIN file back to the .EXE file
  85. with the following command:
  86.  
  87.         Prompt>ren turbo.bin turbo.exe <Return>
  88. END NUMBERED
  89.  
  90. -----------------------------------------------------------------
  91.  
  92. TPC.EXE Patch
  93.  
  94. BEGIN NUMBERED
  95. Rename TPC.EXE to TPC.BIN (DEBUG will not allow modifications to
  96. be made to an .EXE file.)
  97.  
  98.         Prompt>ren tpc.exe tpc.bin <Return>
  99.  
  100. Load TPC.BIN into DEBUG with the command:
  101.  
  102.         Prompt>debug tpc.bin <Return>
  103.  
  104. At DEBUG's hyphen prompt, type:
  105.  
  106.         -a a5d3 <Return>
  107.  
  108. Enter the following Assembler code when the address is displayed:
  109.  
  110.         XXXX:A5D3 cmp si,dx <Return>
  111.  
  112. Press <Return> a second time.
  113.  
  114. Write the modified code to disk by entering the following at the
  115. prompt:
  116.  
  117.         -w <Return>
  118.  
  119. Quit DEBUG by entering the following:
  120.  
  121.         -q <Return>
  122.  
  123. At the DOS prompt, rename the .BIN file back to the .EXE file
  124. with the following command:
  125.  
  126.         Prompt>ren tpc.bin tpc.exe <Return>
  127. END NUMBERED
  128.