Dec 232017
 
Patch for Turbo Pascal for Windows 1.5. For 286's with 287 installed as Str() and Val() reported incorrect results.
File TPW15PAT.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Patch for Turbo Pascal for Windows 1.5. For 286’s with 287 installed as Str() and Val() reported incorrect results.
File Name File Size Zip Size Zip Type
PATCH15.EXE 4896 3007 deflated
PATCH15.PAS 964 455 deflated
README 2127 954 deflated

Download File TPW15PAT.ZIP Here

Contents of the README file



Turbo Pascal for Windows
Version 1.5

TURBO.TPL Patch Program
for '286 systems
with '287 math coprocessors
installed

This package represents a correction to Turbo Pascal for Win-
dows. It addresses the issue where calls to the procedures STR
and VAL produce inconsistant results with ASCIIZ strings
(PCHAR's). This problem only affects '286 IBM PC compatibles
that are equipped with 80287 math coprocessors.

To install this patch, follow these steps.

1. If PATCH15.EXE is not provided, start Turbo Pascal and
compile the source file PATCH15.PAS to disk. This program
will compile with either Turbo Pascal for Windows or Turbo
Pascal for MS-DOS.

2. Locate the directory that contains TPW 1.5's TPW.TPL
file. Normally, the TPW Install program places this file
in a directory called \TPW.

3. With the above directory as the current directory, run
the file PATCH15.EXE. If done correctly, the program will
display the message "TPW.TPL patch complete." on screen.

If you receive an error message, ensure that the directory that
contains TPW.TPL is the current directory when PATCH15.EXE is
run. Also ensure that the TPW.TPL file being corrected is the
one for Version 1.5 of Turbo Pascal for Windows. PATCH15.EXE
will not function with any other version of TPW.TPL.

Instructions for TPW 1.0 / 1.5 RTL source code patch to fix
Str/Val problem on 80286+80287 machines running Windows 3.1

In the TPW RTL source code, edit the DF87.ASM file, found in the
SYS subdirectory. Find function Float2Str, go to label @@11.
Replace:

@@11:
IFDEF WindowsVersion
CMP BYTE PTR CS:@@12, 9BH
JE @@12

with:

@@11:
IFDEF WindowsVersion
CMP BYTE PTR CS:@@12, 0CDH
JNE @@12


Save the file and rebuild the RTL. The system unit will be
modified by this change, which will probably cause all units in
the RTL to be recompiled.



 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)