Category : Pascal Source Code
Archive   : PASS_ALL.ZIP
Filename : TI352.ASC

 
Output of file : TI352.ASC contained in archive : PASS_ALL.ZIP









PRODUCT : TURBO PASCAL NUMBER : 352
VERSION : 3.01A - 3.02A
OS : PC-DOS
DATE : JULY 1, 1987 PAGE : 1/2
TITLE : ADDING DRIVE LETTERS UP TO "Z"




The Turbo Pascal, Version 3.01A, ChDir procedure causes an I/O
error if the drive designator is greater than Q:. This can be
troublesome for installations whose LASTDRIVE is set to a higher
letter. The comparison that enforces this limit is at address
2CA3. It checks the drive letter to see if it is greater than A +
OFh (i.e.,Q). We modified this instruction to allow drive letters
up to Z inclusive.

This patch is worthwhile even if you never use any drive letters
beyond Q, for the change will affect all the programs you
compile. To apply the patch, first make a copy of TURBO.COM, PC-
DOS, Version 3.01A (never patch the original of any program!).
Load it into DEBUG with the command:

DEBUG TURBO.COM

At DEBUG'S "-" prompt, enter the command U 2CA3. This will
Unassemble the program starting with the instruction at offset
2CA3. The first instruction you see there should be CMP AL, OF.
(If it is not, you are patching the wrong version of Turbo - see
below). Enter the command E 2CA4 to let you enter bytes at offset
2CA4. The number OF. will appear. Type 1B next to it and press
Return. Repeat this process for address 3737 (i.e. U 3737, then E
3738, changing OF to 1B as before.) Enter W to write the patched
program to disk and Q to quit. You have successfully patched
Turbo Pascal. Your DEBUG session should look something like
this:

C:\TURBO>debug turbo.com
-u 2ca3
56F9:2CA3 3C0F CMP AL 0F
56F9:2CA5 73A7 JNB 2C4E


-e 2ca4
56F9:2CA4 0F.1b
-u 3737
56F9:3737 3C0F CMP AL,0F
56F9:3739 770C JA 3747


-e 3738
56F9:3738 0F.1b














PRODUCT : TURBO PASCAL NUMBER : 352
VERSION : 3.01A - 3.02A
OS : PC-DOS
DATE : JULY 1, 1987 PAGE : 2/2
TITLE : ADDING DRIVE LETTERS UP TO "Z"




-w
Writing 9AF7 bytes
-q


To patch the 8087 and BCD versions, follow the same procedure
with different addresses. For TURBO-87.COM, Unassemble at
addresses 2756 and 3200, and Enter the patch at 2757 and 3201.
For TURBOBCD.COM, Unassemble at addresses 2BB1 and 3658, and
Enter at 2BB2 and 3659. For version 3.02A of Turbo Pascal use the
following patch locations: For TURBO.COM, Unassemble at addresses
2C74 and 372E, and Enter the patch at 2C75 and 372F. For
TURBO-87.COM, Unassemble at addresses 2727 and 31F4, and Enter
the patch at 2728 and 31F5. For TURBOBCD.COM, Unassemble at
addresses 2B84 and 3650, and Enter the patch at 2B85 and 3651.

Reprinted by Permission:

PC Magazine
January 13, 1987
(c) 1987 Ziff Communications Company