home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / turbo_c / bugs.zip / TURBOFIX.DOC < prev   
Text File  |  1987-06-23  |  16KB  |  432 lines

  1. The following material consists of three patches for Borland's Turbo C
  2. version 1.0.  It was taken from the notes newsgroup comp.sys.ibm.pc and
  3. was originally posted as a reply to a message reporting a bug in the
  4. handling of floating division of two constants.  Part of the original
  5. message is preserved below (the lines prefixed with >).
  6.  
  7. The bug is reported to have been only in the earliest copies of Turbo
  8. C shipped.  It is easy enough to see if your copy has it, just do the
  9. test outlined below.  If you get 0.8 as the answer, your copy has the
  10. bug.
  11.  
  12. The other two patches claim to fix other problems.  These are outlined
  13. below.
  14.  
  15. Though I do not know the original source of the patches, I believe them
  16. to be authoritative.
  17.  
  18.                                    -------- Paul J. Gans
  19.  
  20.  
  21. ========================================================================
  22.  
  23.  
  24.  
  25. Article 4860 of comp.sys.ibm.pc:
  26. Path: cmcl2!yale!husc6!panda!teddy!jpn
  27. From: jpn@teddy.UUCP (John P. Nelson)
  28. Newsgroups: comp.sys.ibm.pc
  29. Subject: Re: Turbo C division bug
  30. Message-ID: <4130@teddy.UUCP>
  31. Date: 22 Jun 87 22:29:10 GMT
  32. References: <105@flnexus.ATT.COM>
  33. Reply-To: jpn@teddy.UUCP (John P. Nelson)
  34. Organization: GenRad, Inc., Concord, Mass.
  35. Lines: 115
  36.  
  37. >It [Turbo C] does, however, seem to have a serious bug with the floating
  38. >point division routines. If your program does division on two constants:
  39. >
  40. >float x;
  41. >
  42. >x = 5.0/4.0;
  43. >
  44. >The result will be as if the division was inverted (i.e x = 4.0/5.0)
  45.  
  46. And here is the patch.  Apparently only the earliest copies are afflicted
  47. with the bug.  Enjoy.
  48.  
  49. PRODUCT : TURBO C
  50. VERSION : 1.0
  51.      OS : PC-DOS
  52.    DATE : MAY 20, 1987                                       PAGE : 1/2
  53.  
  54.   TITLE : FLOATING POINT EVALUATION - PATCH
  55.  
  56.  
  57.  
  58.  
  59.      The following patch solves a problem with dividing floating point
  60.      evaluation.
  61.  
  62.      To apply this patch, you will need to use the DOS utility DEBUG.COM.
  63.      You may obtain a copy of DEBUG.COM from one of your original PC-DOS
  64.      or  MS-DOS diskettes.
  65.  
  66.      NOTE:   1. Do not patch your original Turbo C disk, use a working or
  67.                 backup copy of TCC.EXE and TC.EXE for this patch.
  68.  
  69.              2. DEBUG is not sensitive to upper and lower case.  All ad-
  70.                 dresses are listed in upper case for ease of readibility.
  71.  
  72.              3. XXXX,YYYY,ZZZZ are hexidecimal digits returned by DEBUG.
  73.                 You must  replace these  digits accordingly when  typing
  74.                 in your commands.
  75.  
  76.              4. While in DEBUG, the prompt will appear as a dash (-).
  77.  
  78.              5. If you do not receive the appropriate response,press "q"
  79.                 followed by  <Enter>,  to exit  from DEBUG.   Check your
  80.                 version number and, if correct, try again.
  81.  
  82.              6. TCC.EXE and TC.EXE will not fit together onto a 360K disk.
  83.                 To patch both  programs on a floppy disk,  you may need to
  84.                 copy  TCC.EXE and DEBUG.COM  onto one disk and perform the
  85.                 patch.  Save the patched version of TCC.EXE to another
  86.                 disk.  Repeat the same steps using TC.EXE.
  87.  
  88.      At the  DOS prompt,  type the  following  information exactly as it
  89.      appears (Conclude each line by pressing <Enter>).
  90.  
  91. PRODUCT : TURBO C
  92. VERSION : 1.0
  93.      OS : PC-DOS
  94.    DATE : MAY 20, 1987                                       PAGE : 2/2
  95.   TITLE : DIVISION OF CONSTANTS - PATCH
  96.  
  97.                          Patch for TCC.EXE
  98.  
  99.      Type the following:                      You will see:
  100.  
  101.      ren tcc.exe tcc.xex<Enter>               A>
  102.  
  103.      debug tcc.xex<Enter>                     -
  104.  
  105.      r<Enter>                                 ... CS=XXXX ...
  106.                                               -
  107.  
  108.      h XXXX 2420<Enter>                       YYYY  ZZZZ
  109.                                               -
  110.  
  111.      e YYYY:369<Enter>                        YYYY:0369   0A.
  112.  
  113.      6<Enter>                                 -
  114.  
  115.      e YYYY:36F<Enter>                        YYYY:036F   06.
  116.  
  117.      A<Enter>                                 -
  118.  
  119.      w<Enter>                                 Writing 2948A bytes
  120.  
  121.      q<Enter>                                 A>
  122.  
  123.      ren tcc.xex tcc.exe<Enter>
  124.  
  125.                              Patch for TC.EXE
  126.  
  127.      Type the following:                      You will see:
  128.  
  129.      ren tc.exe tc.xex<Enter>                 A>
  130.  
  131.      debug tc.xex<Enter>                      -
  132.  
  133.      r<Enter>                                 ... CS=XXXX ...
  134.                                               -
  135.  
  136.      h XXXX 2D01<Enter>                       YYYY  ZZZZ
  137.                                               -
  138.  
  139.      e YYYY:35E<Enter>                        YYYY:035E   0A.
  140.  
  141.      6<Enter>                                 -
  142.  
  143.      e YYYY:364<Enter>                        YYYY:0364   06.
  144.  
  145.      A<Enter>                                 -
  146.  
  147.      w<Enter>                                 Writing 38759 bytes
  148.  
  149.      q<Enter>                                 A>
  150.  
  151.      ren tc.xex tc.exe<Enter>
  152.  
  153. =============================================================================
  154.  
  155. Relay-Version: version nyu B notes v1.5 12/10/84; site acf4.UUCP
  156. From: jpn@teddy.UUCP (John P. Nelson)
  157. Date: 22-Jun-87 18:54 EDT
  158. Date-Received: 22-Jun-87 21:15 EDT
  159. Subject: Turbo C structure bug (+Fix)
  160. Message-ID: <4133@teddy.UUCP>
  161. Path: acf4!cmcl2!yale!husc6!panda!teddy!jpn
  162. Newsgroups: comp.sys.ibm.pc
  163. Organization: GenRad, Inc., Concord, Mass.
  164. Lines: 152
  165.  
  166.  
  167. PRODUCT : TURBO C                                               NUMBER : 355
  168. VERSION : 1.0                                           
  169.      OS : PC-DOS
  170.    DATE : May 28, 1987                                          PAGE : 1/1
  171.  
  172.  TITLE  : STRUCTURE PUSH FLOATING POINT PATCH
  173.  
  174. ______________________________________________________________________________
  175.  
  176.  
  177.      The following patch solves a problem with pushing structures
  178.      with floating point elements onto the stack in Turbo C.
  179.  
  180.      To apply this patch, you will need to use the DOS utility DEBUG.COM.
  181.      You may obtain a copy of DEBUG.COM from one of your original PC-DOS
  182.      or  MS-DOS diskettes.
  183.  
  184.      NOTE:   1. Do not patch your original Turbo C disk, use a working or
  185.                 backup copy of TCC.EXE and TC.EXE for this patch.
  186.  
  187.              2. DEBUG is not sensitive to upper and lower case.  All ad-
  188.                 dresses are listed in upper case for ease of readibility.
  189.  
  190.              3. XXXX,YYYY,ZZZZ are hexidecimal digits returned by DEBUG.
  191.                 You must  replace these  digits accordingly when  typing
  192.                 in your commands.
  193.  
  194.              4. While in DEBUG, the prompt will appear as a dash (-).
  195.  
  196.              5. If you do not receive the appropriate response,press "q"
  197.                 followed by  <Enter>,  to exit  from DEBUG.   Check your
  198.                 version number and, if correct, try again.
  199.  
  200.              6. TCC.EXE and TC.EXE will not fit together onto a 360K disk.
  201.                 To patch both  programs on a floppy disk,  you may need to
  202.                 copy  TCC.EXE and DEBUG.COM  onto one disk and perform the
  203.                 patch.  Save the patched version of TCC.EXE to another
  204.                 disk.  Repeat the same steps using TC.EXE.
  205.  
  206.      At the  DOS prompt,  type the  following  information exactly as it
  207.      appears (Conclude each line by pressing <Enter>).
  208.  
  209.  
  210.                              Patch for TCC.EXE
  211.  
  212.      Type the following:          You will see:
  213.  
  214.      ren tcc.exe tcc.xex<Enter>   A>
  215.  
  216.      debug tcc.xex<Enter>         -
  217.  
  218.      r<Enter>                     ... CS=XXXX ...
  219.                                   -
  220.  
  221.      h XXXX 1C0C<Enter>           YYYY  ZZZZ
  222.                                   -
  223.  
  224.      e YYYY:2FAD<Enter>           YYYY:2FAD   25.
  225.  
  226.      A9<Space>                    YYYY:2FAD   25.A9   01.
  227.      <Space>                      YYYY:2FAD   25.A9   01.     00.
  228.      <Space>                      YYYY:2FB0   81.
  229.      74<Space>                    YYYY:2FB0   81.74   E2.
  230.      0B<Space>                    YYYY:2FB0   81.74   E2.0B   00.
  231.      40<Space>                    YYYY:2FB0   81.74   E2.0B   00.40   00.
  232.      26<Space>                    YYYY:2FB0   81.74   E2.0B   00.40   00.26
  233.                                               0B.
  234.      83<Space>                    YYYY:2FB0   81.74   E2.0B   00.40   00.26
  235.                                               0B.83   D0.
  236.      47<Space>                    YYYY:2FB0   81.74   E2.0B   00.40   00.26
  237.                                               0B.83   D0.47   74.
  238.      6<Space>                     YYYY:2FB0   81.74   E2.0B   00.40   00.26
  239.                                               0B.83   D0.47   74.6    0A.
  240.      1<Space>                     YYYY:2FB8   26.
  241.      <Space>                      YYYY:2FB8   26.     83.
  242.      <Space>                      YYYY:2FB8   26.     83.     47.
  243.      57<Space>                    YYYY:2FB8   26.     83.     47.57   06.
  244.      8<Space>                     YYYY:2FB8   26.     83.     47.57   06.8
  245.                                               01.
  246.      0<Space>                     YYYY:2FB8   26.     83.     47.57   06.8
  247.                                               01.00   26.
  248.      29<Space>                    YYYY:2FB8   26.     83.     47.57   06.8
  249.                                               01.00   26.29   83.
  250.      6<Space>                     YYYY:2FB8   26.     83.     47.57   06.8
  251.                                               01.00   26.29   83.6    57.
  252.      54<Space>                    YYYY:2FC0   08.
  253.      74<Space>                    YYYY:2FC0   08.74   00.
  254.      90<Enter>                    YYYY:2FC0   08.74   00.90
  255.                                   -
  256.  
  257.      w<Enter>                     Writing 2948A bytes
  258.                                   -
  259.  
  260.      q<Enter>                     A>
  261.  
  262.      ren tcc.xex tcc.exe<Enter>   A>
  263.  
  264.  
  265.                              Patch for TC.EXE
  266.  
  267.      Type the following:          You will see:
  268.  
  269.      ren tc.exe tc.xex<Enter>     A>
  270.  
  271.      debug tc.xex<Enter>          -
  272.  
  273.      r<Enter>                     ... CS=XXXX ...
  274.                                   -
  275.  
  276.      h XXXX 2557<Enter>           YYYY  ZZZZ
  277.                                   -
  278.  
  279.      e YYYY:2FA4<Enter>           YYYY:2FA4   25.
  280.  
  281.      A9<Space>                    YYYY:2FA4   25.A9   01.
  282.      <Space>                      YYYY:2FA4   25.A9   01.     00.
  283.      <Space>                      YYYY:2FA4   25.A9   01.     00.     81.
  284.      74<Space>                    YYYY:2FA8   E2.
  285.      0B<Space>                    YYYY:2FA8   E2.0B   00.
  286.      40<Space>                    YYYY:2FA8   E2.0B   00.40   00.
  287.      26<Space>                    YYYY:2FA8   E2.0B   00.40   00.26   0B.
  288.      83<Space>                    YYYY:2FA8   E2.0B   00.40   00.26   0B.83
  289.                                               D0.
  290.      47<Space>                    YYYY:2FA8   E2.0B   00.40   00.26   0B.83
  291.                                               D0.47   74.
  292.      6<Space>                     YYYY:2FA8   E2.0B   00.40   00.26   0B.83
  293.                                               D0.47   74.6    0A.
  294.      1<Space>                     YYYY:2FA8   E2.0B   00.40   00.26   0B.83
  295.                                               D0.47   74.6    0A.1    26.
  296.      <Space>                      YYYY:2FB0   83.
  297.      <Space>                      YYYY:2FB0   83.     47.
  298.      57<Space>                    YYYY:2FB0   83.     47.57   06.8    26.
  299.      8<Space>                     YYYY:2FB0   83.     47.57   06.8    01.
  300.      0<Space>                     YYYY:2FB0   83.     47.57   06.8    01.00
  301.                                               26.
  302.      29<Space>                    YYYY:2FB0   83.     47.57   06.8    01.00
  303.                                               26.29   83.
  304.      6<Space>                     YYYY:2FB0   83.     47.57   06.8    01.00
  305.                                               26.29   83.6    57.6    08.
  306.      C<Space>                     YYYY:2FB0   83.     47.57   06.8    01.00
  307.                                               26.29   83.6    57.C    08.
  308.      A3<Space>                    YYYY:2FB8   00.
  309.      90<Enter>                    YYYY:2FB8   00.90
  310.                                   -
  311.  
  312.      w<Enter>                     Writing 38759 bytes
  313.                                   -
  314.  
  315.      q<Enter>                     A>
  316.  
  317.      ren tc.xex tc.exe<Enter>     A>
  318.  
  319.  
  320. ===========================================================================
  321.  
  322.  
  323. Relay-Version: version nyu B notes v1.5 12/10/84; site acf4.UUCP
  324. From: jpn@teddy.UUCP (John P. Nelson)
  325. Date: 22-Jun-87 18:52 EDT
  326. Date-Received: 22-Jun-87 21:15 EDT
  327. Subject: Turbo C -G bug (FIX!)
  328. Message-ID: <4132@teddy.UUCP>
  329. Path: acf4!cmcl2!yale!husc6!panda!teddy!jpn
  330. Newsgroups: comp.sys.ibm.pc
  331. Organization: GenRad, Inc., Concord, Mass.
  332. Lines: 97
  333.  
  334.  
  335. PRODUCT : TURBO C                                               NUMBER : 356
  336. VERSION : 1.0                                           
  337.      OS : PC-DOS
  338.    DATE : May 28, 1987                                          PAGE : 1/1
  339.  
  340.  TITLE  : -G PATCH
  341.  
  342. ______________________________________________________________________________
  343.  
  344.  
  345.      The following patch solves a problem in Turbo C where the
  346.      compiler can run out of memory compiling a large switch
  347.      statement if the -G option is used.
  348.  
  349.      To apply this patch, you will need to use the DOS utility DEBUG.COM.
  350.      You may obtain a copy of DEBUG.COM from one of your original PC-DOS
  351.      or  MS-DOS diskettes.
  352.  
  353.      NOTE:   1. Do not patch your original Turbo C disk, use a working or
  354.                 backup copy of TCC.EXE and TC.EXE for this patch.
  355.  
  356.              2. DEBUG is not sensitive to upper and lower case.  All ad-
  357.                 dresses are listed in upper case for ease of readibility.
  358.  
  359.              3. XXXX,YYYY,ZZZZ are hexidecimal digits returned by DEBUG.
  360.                 You must  replace these  digits accordingly when  typing
  361.                 in your commands.
  362.  
  363.              4. While in DEBUG, the prompt will appear as a dash (-).
  364.  
  365.              5. If you do not receive the appropriate response,press "q"
  366.                 followed by  <Enter>,  to exit  from DEBUG.   Check your
  367.                 version number and, if correct, try again.
  368.  
  369.              6. TCC.EXE and TC.EXE will not fit together onto a 360K disk.
  370.                 To patch both  programs on a floppy disk,  you may need to
  371.                 copy  TCC.EXE and DEBUG.COM  onto one disk and perform the
  372.                 patch.  Save the patched version of TCC.EXE to another
  373.                 disk.  Repeat the same steps using TC.EXE.
  374.  
  375.      At the  DOS prompt,  type the  following  information exactly as it
  376.      appears (Conclude each line by pressing <Enter>).
  377.  
  378.  
  379.                              Patch for TCC.EXE
  380.  
  381.      Type the following:          You will see:
  382.  
  383.      ren tcc.exe tcc.xex<Enter>   A>
  384.  
  385.      debug tcc.xex<Enter>         -
  386.  
  387.      r<Enter>                     ... CS=XXXX ...
  388.                                   -
  389.  
  390.      h XXXX 1635<Enter>           YYYY  ZZZZ
  391.                                   -
  392.  
  393.      e YYYY:7E0<Enter>            YYYY:07E0   7C.
  394.  
  395.      72<Enter>                    YYYY:07E0   7C.72
  396.                                   -
  397.  
  398.      w<Enter>                     Writing 2948A bytes
  399.                                   -
  400.  
  401.      q<Enter>                     A>
  402.  
  403.      ren tcc.xex tcc.exe<Enter>   A>
  404.  
  405.  
  406.                              Patch for TC.EXE
  407.  
  408.      Type the following:          You will see:
  409.  
  410.      ren tc.exe tc.xex<Enter>     A>
  411.  
  412.      debug tc.xex<Enter>          -
  413.  
  414.      r<Enter>                     ... CS=XXXX ...
  415.                                   -
  416.  
  417.      h XXXX 1F84<Enter>           YYYY  ZZZZ
  418.                                   -
  419.  
  420.      e YYYY:7E1<Enter>            YYYY:07E1   7C.
  421.  
  422.      72<Enter>                    YYYY:07E1   7C.72
  423.                                   -
  424.  
  425.      w<Enter>                     Writing 38759 bytes
  426.                                   -
  427.  
  428.      q<Enter>                     A>
  429.  
  430.      ren tc.xex tc.exe<Enter>     A>
  431.  
  432.