Leaked source code of windows server 2003
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.

305 lines
12 KiB

  1. MASM 5.NT Version Information
  2. 5.NT.01, 12/5/90 - Jeff Spencer. Initial release, same functionality as the
  3. released product Masm 5.10A.
  4. 5.NT.02, 3/5/91 - Bugs fixed:
  5. - The xchg operator given two undefined symbols rather than
  6. registers would GP fault. The problem was caused by referencing
  7. an invalid pointer after having detected the error. The solution
  8. was to stop processing the xchg instruction when this error
  9. is detected.
  10. - Some symbols defined by equates were not being found by
  11. the symsrch routine. The assembler was incorrectly attempting
  12. to scope equates. This code just happend to work on 16
  13. bit environments because of the memory alignment. It failed
  14. on NT/386. The code was removed.
  15. ========================================================================
  16. MASM 5.NT.01
  17. Written 12/5/90, by Jeff Spencer.
  18. Current state of MASM:
  19. Masm 5.NT.01 is a portable version of MASM 5.10A. It works exactly like
  20. MASM 5.10A with the following exceptions:
  21. - Masm 5.NT.01 does not support floating point initializers. This is
  22. because the strtod and _strtold C runtime functions are unavailable
  23. at this time. Future versions will support this capability
  24. (the code to support this has been ifdef'd out). Attempting to
  25. initialize a variable with a floating point number will result in a
  26. divide by zero error at assembly time.
  27. - Support for the MS floating point data format, and .MSFLOAT directive
  28. have been removed. Once floating point initializers are supported they
  29. will use the IEEE formats.
  30. - The time/date stamp in listing files has changed to the format
  31. provided by the standard C runtime libraries.
  32. The code has been built and tested on NT/386 and NT/MIPS using the OS2
  33. subsystem C runtime libraries. As of 12/5/90 there are no known bugs in
  34. MASM.
  35. General description of MASM 5.NT.01 code:
  36. The code contained in this directory can produce an assembler to run on
  37. OS2 1.2, OS2 2.0, and any version of NT. NT portability was achieved by
  38. removing all assembly language and replacing all operating system
  39. calls with C runtime calls.
  40. Conditional Compilation Switches:
  41. NOFLOAT - This constant is a binary switch. If it is absent the
  42. code for floating point initializers is compiled. If it is
  43. present then the floating point initializer code isn't
  44. compiled. Currently the sources file does define this
  45. constant. This allows MASM to be built despite the fact
  46. that the strtod and _strtold functions don't exist
  47. in the NT C runtime libraries. When these functions are
  48. available the definition of NOFLOAT should be removed from
  49. the sources file and masm rebuilt.
  50. FIXCOMPILERBUG - When defined allows some ifdef's to go around
  51. some known compiler bugs. This include both CL386 and
  52. MIPS compiler bugs. (These have been reported but not
  53. fixed as of 12/5/90.)
  54. <others> - See asmconf.h.
  55. General Info on building MASM for NT:
  56. MASM 5.NT has been set up to use the standard NT build mechanism without
  57. the requirement of the source actually being in the NT source tree. What
  58. follows is a quick synopsis of my experiences with the NT build environment.
  59. Building for the NT environment is not done through the standard
  60. nmake mechanism. Instead the NT group uses a standard set of tools
  61. that assume that the NT file tree starts at <current drive>\NT.
  62. The best documentation I've found on how to set up to build files to run
  63. on NT is in a file called newcomer.txt on \\ntos2\ntrel\release. KyleSh wrote
  64. this document and can be quite helpful. Note that this document describes
  65. both the development projects and the release project. It is only necessary
  66. to enlist in one of these two projects. The advantage of enlisting in the
  67. developer project is that you have the latest version of everything, and
  68. with the right hardware, can build for MIPS. The disadvantage is
  69. that this tree occupies over 100Mb of disk space. Although you can ghost
  70. some of this I'm not sure which portions of the tree aren't needed. You also
  71. have to build your own version of the NT kernel, OS2 subsystem, ect. The
  72. advantage to enlisting in the release project is that you only have to build
  73. your own code. And it requires only 21Mb of disk space. I found that for
  74. building masm for NT/386 the release project was adequate. However, getting
  75. the environment configuration files in the developr directory set up for
  76. yourself can be a hassle. Also, be forewarned that sometimes the build tools
  77. on the released project don't get updated as quickly as they should.
  78. Note that the MASM tree must reside on the same logical drive (drive letter)
  79. as the NT stuff. This is a limitation of how the NT tools work.
  80. The masm project can be enlisted in from almost anywhere on the disk.
  81. I suggest placing it in \MASM. Just make sure it is on the same drive
  82. as the NT tree.
  83. To use the developer projects rather than the released project you will
  84. need to enlist in the projects: public, private, developr and os2.
  85. Building MASM for NT/386:
  86. Released project method:
  87. - cd \NT (from \\os2nt\ntrel)
  88. - ssync -r
  89. - cd \MASM\510nt
  90. - build -esi -386 masm
  91. Note: I've been having trouble with this hanging up at the link
  92. step. Simply executing nmake at that point will finish the build,
  93. assuming your environment variables are set up for 386 builds.
  94. Develeoper projects method:
  95. - cd \NT
  96. - ntsync
  97. - build -esi -386 os2 os2ss cmd cmd32
  98. Note: This to build the necessary libraries to link with
  99. and a version of NT to run on.
  100. - cd \MASM\510nt
  101. - build -esi -386 masm
  102. Building MASM for NT/MIPS:
  103. As of this writing to build for the MIPS processor requires an Etherlink
  104. II network card and TCP/IP software. MarkL has this software and
  105. directions on how to install it. This is required because the
  106. actual MIPS compilation is done on a DEC server. The makefile.def
  107. file automatically ships the file to the server compiles it and ships
  108. it back.
  109. To build for the MIPS processor use the same procedure as for the 386
  110. except replace the -386 switch with the -mips switch.
  111. Building MASM for OS2 1.2:
  112. The environment necessary:
  113. MASMOS = <nothing, i.e. not set>
  114. - This causes the OS2 1.2 version to be built by makefile.os2
  115. rather than the OS2 2.0 version.
  116. PATH = <os2>;<LanMan>;<slm>;c:\tools\binb;c:\tools\binp
  117. LIB = c:\tools\lib
  118. INCLUDE = c:\tools\include
  119. Note: Tools directory comes from \\slug\tools\src\tools <pswd: vorga>
  120. The command line:
  121. - cd \MASM\510nt
  122. - md obj\os2.12 <if this hasn't been done yet>
  123. - nmake -f makefile.os2
  124. - The object and executable files will be in obj\os2.12
  125. Building MASM for OS2 2.0:
  126. The environment necessary:
  127. MASMOS = OS2_2
  128. - This causes makefile.os2 to build the OS2 2.0 version when
  129. it nmake is involked.
  130. PATH = <os2>;<LanMan>;<slm>;c:\c6_386\binb;c:\c6_386\binp
  131. - The release point for c6_386 is \\slproduct\current\c6_386
  132. however the compiler code on \\sl\users\hanss\larch is
  133. generally more current, and more bug free. The password
  134. for \\slproduct\current is rikwrast, the password for
  135. \\sl\users is soonhely.
  136. LIB = c:\c6_386\lib
  137. - this comes from \\slproduct\current\c6_386\lib
  138. <pswd: rikwrast>
  139. INCLUDE = c:\c6_386\include
  140. - this comes from \\slproduct\current\c6_386\include
  141. The command line:
  142. - cd \MASM\510nt
  143. - md obj\os2.20 <if this hasn't been done yet>
  144. - nmake -f makefile.os2
  145. - The objects and executables will be in obj\os2.20
  146. MASM execution speed:
  147. In order to speed up the port from MASM to NT we decided to replace all
  148. occurences of integer variables with either signed or unsigned short
  149. variables. This was done at the expense of execution speed and size.
  150. Therefore, this is one area that could be visited if execution speed
  151. becomes an issue.
  152. Testing MASM:
  153. There are two different mechanisms available to test MASM on NT. The normal
  154. mechanism uses the testing tool td. Although td is the preferred way to do
  155. the testing it currently doesn't work on NT because of various subsystem bugs.
  156. Because of this a set of very simple command files has been developed to run
  157. the tests.
  158. Testing MASM using TD:
  159. - Read the readme file on \\slog\slm\src\nt
  160. - Enlist in the NT project on \\slop\slm <pswd:ungepamm>
  161. - The directory you enlist must be on the same drive as the NT tree.
  162. - Build all the tools in the project (see readme)
  163. - Put the exe's built in a directory in the path on the NT test machine.
  164. - Put masm.exe in the same directory.
  165. - Tree copy \\loki\test\masmqa to \masmqa on the NT test machine.
  166. - Boot NT.
  167. - Start the OS2 cmd processor (cmd32).
  168. - cd to the masmqa directory.
  169. - Run the command "td masm=masm"
  170. - Within the masmqa directory will be a file called masm.log. This file
  171. contains the summary of the test results. Within each of the
  172. subdirectories below masmqa will be a log file with the same name as
  173. the subdirectory that contains the test results for that directory.
  174. Testing MASM using command files:
  175. - Tree copy \\loki\test\masmqa to \masmqa on the NT test machine.
  176. - Over the top of this tree copy the masmqa tree contained under the
  177. masm 510nt project (this directory). This adds the necessary command
  178. files to the standard test tree.
  179. - Put masm.exe somewhere in the NT file execution path.
  180. - Boot NT
  181. - Start the OS2 command processor (cmd32).
  182. - cd to the masmqa directory.
  183. - Run the command file "testnt.cmd".
  184. - This will assemble all the test files and leave the resulting objects
  185. on the hard disk.
  186. - Boot OS2 1.2.
  187. - cd to the masmqa directory and run the command file "checknt.cmd".
  188. - This will compare each of the object files with the pattern in
  189. the results subdirectory. Note that a binary comparison is not
  190. done. This is because the command line that td and the command
  191. files use to invoke masm are slightly different. This results in
  192. the file name stored in masm.obj having a slightly different mix
  193. of upper and lower case. Rather than doing a binary compare a diff
  194. is done of the decoded object files. Then expected differences are
  195. thrown out.
  196. - Note: The command files currently skip any tests that would
  197. involve redirecting the error output to a file. This is because the
  198. NT command processor can't do redirection at the moment. Hopefully
  199. by the time a working command processor is running these command files
  200. can be abandoned completely in favor of td.
  201. - NT/386 status:
  202. Currently the top level command file must be cut in half and executed
  203. separately for the tests to run through. Otherwise NT gets tired and
  204. dies.
  205. - NT/MIPS status:
  206. Currently files can't be found unless they are in the root directory
  207. or a full path to the file is specified. This appears to be
  208. an NT problem and not related to MASM, therefore I've simply been
  209. working around this limitation. This should be fixed after the windows
  210. subsystem command processor is available. To work around the problem
  211. move the assembly file and all include files to the root directory.
  212. Expected failures:
  213. - Some of the test files generate warnings. These can be safely ignored.
  214. Most of these warnings occur in the win386 subdirectories.
  215. - There is a test that checks the error output from code that has too
  216. long of a line in it. The error output will not match for this test.
  217. This is actually an improvement on MASM 5.NT. The MASM 5.10A assembler
  218. used to literally cut the line in half and try to process the second
  219. half of the line as a separate line. This would then generate more errors
  220. than actually existed in the file. MASM 5.NT doesn't do this but instead
  221. logs the line too long error and goes on to the next line.