Dec 192017
 
The latest TC v2 patches from Borland's BBS.
File TC2PAT-2.ZIP from The Programmer’s Corner in
Category C Source Code
The latest TC v2 patches from Borland’s BBS.
File Name File Size Zip Size Zip Type
COMPACT.OBJ 2051 1608 deflated
FLT-TC.DIF 372 182 deflated
FLT-TCC.DIF 375 182 deflated
HUGE.OBJ 2030 1584 deflated
LARGE.OBJ 2058 1611 deflated
MEDIUM.OBJ 2063 1622 deflated
P1TC2.DIF 175 141 deflated
P2TL2.DIF 214 161 deflated
P3TC2.DIF 178 138 deflated
PATCH.COM 11678 7228 deflated
PATCH.DOC 3992 1639 deflated
PATFLOAT.BAT 546 300 deflated
PATPRNTF.BAT 1262 500 deflated
PATSTAT.BAT 864 443 deflated
PATTC.BAT 509 296 deflated
PATTLIB.BAT 495 290 deflated
README.PAT 1047 503 deflated
SMALL.OBJ 2056 1612 deflated
STAT.OBJ 1143 840 deflated
XCVT.OBJ 2030 1584 deflated

Download File TC2PAT-2.ZIP Here

Contents of the PATCH.DOC file


PATCH.COM

Syntax: patch [-u] [-v#] dif_file prog_file [out_file]

PATCH.COM reads the text from dif_file and applies the patch to prog_file.
The diff file is relatively free format. Any number of spaces or tabs can
appear between two values, and any number of spaces, tabs, and blank lines
can appear between lines. The file consists of zero or more pairs of lines
in the following format:

offset: newbyte [newbyte ...]
oldbyte [oldbyte ...]

All values are represented in the file using hexidecimal digits. The value
of offset can range from 0 to 7FFFFFFF hex. The values of new and old bytes
can range from 0 to FF hex. Comments can be inserted in the file by starting
a new line with a semicolon (;).

----------------------------------- Example --------------------------------
; Example patch file
6: 88
85
1DEE: 74 1A 52 7F FF 77 00
73 00 1A 52 7F ff 77
; notice the free format
03636: 053 08 5B 19 71 8 5B 19

00 00 00 00 00 00 00 0
----------------------------------------------------------------------------

As you can see from the first two pairs, the diff file is more readable when
formatted nicely. But, you can be pretty flexible as shown in the third
pair of lines. Note: The first line of each pair contains the new byte values
while the second line contains the old byte values.

When applying a patch, PATCH.COM makes a first pass to check that all bytes
in the file which will be changed, currently match the old values which are
defined in dif_file. If they don't, an error message is printed and the
patch is not applied. If they do match, all the corresponding bytes are
changed to their new values. If any error occurs during this second step,
it is most likely an out of disk space error. During the update, a backup
copy of your original file (.BAK) is kept. This means you need twice as
much disk space if your input and output files are on the same disk drive.
In case of an error, the temporary file is usually deleted and the .BAK file
is renamed back to the original name. If something else goes wrong, like a
power outage, you should still have your original file on the disk with a
.BAK extension.

After the patch is completed:
If the output file is the same as the input file, the .BAK file is deleted.
If the output file is different than the input file, the .BAK file is
renamed back to its original name.

The -u option cause PATCH.COM to undo the patch defined in dif_file. In this
case, it checks that all the bytes to be modified match the new byte values
on the first line of each pair. It then changes the corresponding bytes to
the old byte values defined on the second line of each pair.

The -v option is used to specify which system interrupt vector is used for
patches. System interrupt vector 18H (hex) is used. In rare circumstances,
this vector is already being used by the hardware and is not available.
In those situations you must use this option to override this default value.
The next best choice is 60H (e.g. -v60). If this still does not work,
please contact technical support for assistance. Whatever number you chose,
you must ALWAYS use the same vector number when installing patches to a
program file.

The last parameter (out_file) is optional. If defined, the patched version
of the original file will be saved under the name specified by out_file, and
the original file will be left intact. If it is not specified, the patched
version of the file will have the same name as the original version of the
file, and the original version of the file will be lost.

Note: Because PATCH.COM checks the old values of each byte to be patched,
two or more patches which affect the same byte must be applied in order.
Also, because of the fixed offsets defined in dif_file, the same dif_file will
probably not be usable with multiple versions of the program file being
patched.



 December 19, 2017  Add comments

Leave a Reply