DOS 3.30 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

238 lines
10 KiB

4 years ago
  1. DOCUMENTATION FOR MS-DOS 3.30 BUGFIX DISKETTE
  2. This diskette contains code for bugfixes in the MS-DOS 3.30 Release that
  3. are corrected in the Microsoft MS-DOS 3.30 Packaged Product. These may also
  4. be corrected in an OEM's 3.30 product by utilizing the code on this diskette.
  5. To to this, just copy the files on this disk over the corresponding files in
  6. the DISTRIBUTION DISKETTE tree before doing the builds and making up your
  7. OEM product.
  8. *********************************************************************
  9. Problem: FDISK: logical drive creation doesn't show on fdisk.
  10. Run FDISK. Create a primary partition and then an extended
  11. partition. While creating the extended partition the menu
  12. sequence to create logical drives in the extended partition
  13. should turn up, but it doesn't.
  14. Solution:
  15. Difference in versions of the C compiler (we used C 4.0
  16. instead of C 3.0) exposed a bug in the forcing of a constant
  17. to a long unsigned number. The two compilers treat this
  18. differently.
  19. Changes made were:
  20. a) FDISK.H : line 14 DOS_MAX = 64*1024 ....old
  21. DOS_MAX = 65536L ....new
  22. b) INT13.C : (not related to problem, was just something
  23. noticed along the way)
  24. line 148 max_head[0] ...old
  25. max_head[i] ...new
  26. *************************************************************************
  27. MS-DOS 3.30 Beta FORMAT d: /S on very small partitions problem
  28. Description: Attempting to do a FORMAT d: /S on a hard disk partition
  29. that is smaller than the space required for the system files
  30. resulted in the system files overwritting other partitions
  31. and format reporting approximately 4 GB of free space.
  32. Problem: The problem is simply that a check is never done to see if
  33. enough free space exists to load the system files after the
  34. formatting is done. This problem also occurs on PC-DOS 3.30.
  35. Solution: The solution is to add a check to make sure that there is
  36. enough free space for the system files before we attempt to
  37. copy them. This was done by adding a routine called
  38. CHKSPACE which is called just before WRITEDOS in the module
  39. FORMAT.ASM. CHKSPACE uses DOS interrupt Get Disk Free Space
  40. and compares the number of available clusters with the number
  41. required for the system files. If the amount of free space
  42. is greater than or equal to the amount of space required by
  43. the system files, CHKSPACE returns with the carry flag clear.
  44. Otherwise, it returns withe the carry flag set. Following the
  45. call to CHKSPACE is a check for carry. If carry is set, the
  46. message "No room for system on destination disk" is printed
  47. and the system files are not copied. If carry is not set,
  48. control continues on to WRITEDOS.
  49. Modules: Fixing this bug required changing FORMAT.ASM, MESSAGES.ASM,
  50. and MESSAGES.INC.
  51. Documentation: The entry for "No room for system on destination disk" in
  52. the messages section of the DOS manual states that this error
  53. message is the result of a SYS command. This should be changed
  54. to read SYS or FORMAT. In addition, the entry assumes that the
  55. destination disk is always a diskette and suggests that the
  56. appropriate action is to format a blank diskette with the /S
  57. option. This will do you no good if you are trying to add the
  58. system files to a hard disk partition. The recommended action
  59. should include using FDISK to make the partition larger and
  60. retrying the command if the error occured while attempting to
  61. format a hard disk partition with the /S option.
  62. **************************************************************************
  63. Problem: Volumes in abundance cause boot problems.
  64. Create primary partition and then the extended partition.
  65. in the extended partition create the maximum number of
  66. volumes permitted, i.e. 23. Try booting machine off a 3.30
  67. floppy the machine is down on its knees. Problem doesn't
  68. exist if you have volumes < 23. Problem only on 6M AT.
  69. Solution:
  70. MSBIO2 has a buffer of 23 BDSMs at the end. MSBIO2 is followed
  71. by MSHARD. Since the BDSMs are substancially long in size
  72. the bios relocates MSHARD to the paragraph boundary after
  73. the last BDSM used. This works fine for volumes < 23.
  74. However if all 23 BDSMs are used up MSHARD is relocated to
  75. the next para boundary which happens to be within MSHARD
  76. itself. So MSHARD ends up destroying itself.
  77. Fix - a para buffer between the last BDSM and MSHARD in
  78. MSBIO2.ASM.
  79. **********************************************************************
  80. Problem:
  81. On exercising last two sysinit error messages dos code is
  82. displayed instead of just the messages.
  83. Solution:
  84. In calculating the location where to load dos, a constant is
  85. used to indicate the size of the sysinit segment. this is
  86. different for us.
  87. Changes: In msequ.inc changed sysize from 200 to 203.
  88. Further changes planned: Change the sysize constant to a variable sizing
  89. the sysinit segment.
  90. *************************************************************************
  91. Problem: type filename > "=" hangs the system.
  92. Not only = in quotes but any delimitor causes problems.
  93. This comes from a basic lack of consistency in the treatment
  94. of the role of the " character. In command line parsing anything
  95. between " ----- " is not interpreted. But in forming filenames
  96. a " is taken as a valid character. Once the '>' character is
  97. reached the parser begins forming the filename and takes " as
  98. the first character. The following = is taken as a delimitor and
  99. the filename ended. When the filename is formed the processing
  100. returns to the command line parsing main routine and sees the
  101. next ". After this it just moves anything that comes along till
  102. it meets the next quote and ends up destroying the stack.
  103. Solution: changed filename parsing code to test for quote and decrement
  104. the number of quotes. File changed - tmisc1.asm
  105. ************************************************************************
  106. Problem: DOS FDISK creates partition which overlaps Xenix partition.
  107. Create bad track table (xenix) and then a xenix partition
  108. which occupies whole disk. then boot dos and create partiton
  109. asking it to use all of the space for dos. It just does that
  110. overlapping the partition over the xenix partition.
  111. Problem: 3.3 fdisk was not handling the no space condition.
  112. Solution:
  113. added code to detect no space condition and report error on
  114. such a condition. files changed fdisk.c and space.c. also
  115. when dos tries to create primary partition with a space
  116. requested from the user added error message when there is
  117. no space.
  118. ************************************************************************
  119. Problem:
  120. The bug is that the routine make_partition had been checking for a free
  121. "slot" in the Master Boot Record and aborting the menu if there was none.
  122. This action is not desirable if the user wishes to create a Logical DOS
  123. volume in an existing Extended DOS Partition.
  124. There are several circumstances where this problem becomes evident.
  125. Probably the most common problem would be experienced on a large hard disk with several
  126. DOS partitions defined on it (COMPAQ is not the only OEM to support
  127. multiple DOS partitions on a hard disk...).
  128. Consider a disk with 4 DOS partitions defined on it and the user wants to
  129. delete ONE of the DOS partitions so that an Extended DOS partition may be
  130. defined. After doing this, the ext_create_partition routine allows the
  131. user to define logical DOS volumes.
  132. The user decides that the Logical DOS Volumes he previously created are not
  133. satisfactory after having left FDISK, perhaps he had previously defined
  134. only one Logical DOS Volume and it did not use the entire Extended
  135. Partition.
  136. This time FDISK will not allow the user to select the Create Logical
  137. Volume menu option because there are no free "slots" in the Master Boot
  138. Record although there may well be plenty of space within the Extended DOS
  139. partition.
  140. NOTE: This problem also occurs with the OS/2 implementation of FDISK.
  141. *************************************************************************
  142. Problem: Extend file handle count is broken.
  143. Solution: The para calculation code in handle.asm to calculate the number
  144. of paragraphs needed is coded wrongly. For handle values
  145. less than a para away from the maximum this will cause a carry.
  146. The subsequent rotate by 4 should shift the carry in. IBM 3.3
  147. doesn't use the appropriate rotate instruction.
  148. **************************************************************************
  149. Problem: Disk info initialisation in extended volume wrongly done.
  150. The problem involves creation of Logical DOS Volumes in
  151. an Extended DOS Partition. As you know, each Logical DOS Volume
  152. has a "dummy" Master Boot Record which is necessary to define
  153. the extent of its Logical Volume and to indicate the location of
  154. the next Logical Volume (if one exists). The "dummy" Master
  155. Boot Record for each Logical Volume (except the last one)
  156. contains an entry with a system indicator byte with the value of
  157. 5 - this is the pointer to the next volume. The END_HEAD number
  158. of this type 5 record is ONE greater than the greatest physical
  159. head number on the drive.
  160. This occurs because the entries in the "max_head" array are
  161. initialized to be one more than the greatest physical head
  162. number in the routine "get_disk_info()" in the file INT13.C for
  163. use in calculations. The routine "write_ext_boot_to_disk" in
  164. the file DISKOUT.C does not subtract one from the max_head value
  165. before placeing it into the extended boot record - which is what
  166. results in the "End_Head" field being wrong for the type 5
  167. record.
  168. The line in "write_ext_boot_to_disk" where the subtraction
  169. should take place is shown below...
  170. /* End head */
  171. boot_record[0x1D3] = max_head[disk];
  172. Solution: As mentioned above the line given above should be
  173. boot_record[0x1d3] = max_head[disk] - 1;