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

  1. The Turbo  Pascal, Version 3.01A,  ChDir procedure causes  an I/O
  2. error if  the drive designator  is greater than  Q:. This can  be
  3. troublesome for installations whose LASTDRIVE  is set to a higher
  4. letter.  The comparison  that enforces  this limit  is at address
  5. 2CA3. It checks the drive letter to see if it is greater than A +
  6. OFh (i.e.,Q). We modified this instruction to allow drive letters
  7. up to Z inclusive.
  8.  
  9. This patch is worthwhile even if  you never use any drive letters
  10. beyond  Q,  for  the  change  will  affect  all  the programs you
  11. compile.  To apply  the patch,  first make  a copy  of TURBO.COM,
  12. PC-DOS, Version 3.01A (never patch the original of any program!).
  13. Load it into DEBUG with the command:
  14.  
  15.                          DEBUG TURBO.COM
  16.  
  17. At  DEBUG'S  "-"  prompt,  enter  the  command  U 2CA3. This will
  18. Unassemble the  program starting with  the instruction at  offset
  19. 2CA3. The first  instruction you see there should be  CMP AL, OF.
  20. (If it is not, you are patching  the wrong version of Turbo - see
  21. below). Enter the command E 2CA4 to let you enter bytes at offset
  22. 2CA4. The  number OF. will appear.  Type 1B next to  it and press
  23. Return. Repeat this process for address 3737 (i.e. U 3737, then E
  24. 3738, changing OF to 1B as  before.) Enter W to write the patched
  25. program  to disk  and Q  to quit.  You have  successfully patched
  26. Turbo  Pascal.  Your  DEBUG  session  should  look something like
  27. this:
  28.  
  29.         C:\TURBO>debug turbo.com
  30.         -u 2ca3
  31.         56F9:2CA3 3C0F      CMP      AL 0F
  32.         56F9:2CA5 73A7      JNB      2C4E
  33.  
  34.  
  35.         -e 2ca4
  36.         56F9:2CA4   0F.1b
  37.         -u 3737
  38.         56F9:3737  3C0F     CMP      AL,0F
  39.         56F9:3739  770C     JA       3747
  40.  
  41.  
  42.  
  43.         -e 3738
  44.         56F9:3738  0F.1b
  45.         -w
  46.         Writing 9AF7 bytes
  47.         -q
  48.  
  49. To patch  the 8087 and   BCD versions, follow  the same procedure
  50. with  different   addresses.  For  TURBO-87.COM,   Unassemble  at
  51. addresses 2756  and 3200, and Enter  the patch at 2757  and 3201.
  52. For  TURBOBCD.COM, Unassemble  at  addresses  2BB1 and  3658, and
  53. Enter at 2BB2 and 3659. For version 3.02A of Turbo Pascal use the
  54. following patch locations: For TURBO.COM, Unassemble at addresses
  55. 2C74  and  372E,  and  Enter  the  patch  at  2C75  and 372F. For
  56. TURBO-87.COM, Unassemble  at addresses 2727  and 31F4, and  Enter
  57. the  patch at  2728 and   31F5. For  TURBOBCD.COM, Unassemble  at
  58. addresses 2B84 and 3650, and Enter the patch at 2B85 and 3651.
  59.  
  60. Reprinted by Permission:
  61.  
  62.                            PC Magazine
  63.                            January 13, 1987
  64.                            (c) 1987 Ziff Communications Company
  65.