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.

385 lines
12 KiB

  1. subttl emulator.hst - Emulator history.
  2. ;***
  3. ;emulator.hst - Emulator history.
  4. ;
  5. ; Copyright (c) 1984-89, Microsoft Corporation
  6. ;
  7. ;Purpose:
  8. ; Contains history comments for emulator.
  9. ;
  10. ;
  11. ; Bob Wallace, Microsoft, July 1982
  12. ; John Pollock, Microsoft, August 1982
  13. ; Marlin Eller, Microsoft, December 1982
  14. ; Greg Whitten, Microsoft, February 1984
  15. ; Brad Verheiden, Microsoft, March 1984
  16. ; Jamie Bariteau, Microsoft, September 1985
  17. ; Barry McCord, Microsoft, October 1986
  18. ;
  19. ;
  20. ; Revision History
  21. ;
  22. ; 02/07/84 Greg Whitten
  23. ; new stand-alone version (major restructuring)
  24. ; split up into small include files
  25. ;
  26. ; 02/17/84 Brad Verheiden
  27. ; put transcendentals in same object file
  28. ; fixed bug which always masked unemulated instruction
  29. ;
  30. ; 02/24/84 Greg Whitten
  31. ; PASCAL naming convention is being slowly removed
  32. ; adding initialization/termination code
  33. ; code complete for initial standalone emulator
  34. ;
  35. ; 03/14/84 Greg Whitten
  36. ; added a special truncate to 32-bit integer routine
  37. ;
  38. ; 03/15/84 Greg Whitten
  39. ; fixed bug in FCOM ( cmpsw => cmpsb )
  40. ;
  41. ; 03/19/84 Greg Whitten
  42. ; added code for all segment overrides
  43. ;
  44. ; 03/29/84 Greg Whitten
  45. ; fixed segment override bug
  46. ;
  47. ; 04/05/84 Greg Whitten
  48. ; removed fast SP code
  49. ;
  50. ; 04/09/84 Brad Verheiden
  51. ; added 8087 support
  52. ;
  53. ; 05/23/84 Brad Verheiden
  54. ; Added code to save SI in ProcessOverUnderflow
  55. ;
  56. ; 08/18/84 Greg Whitten
  57. ; REEXECUTE stored the status word when DS was invalid
  58. ; if reexecuting a memory operand
  59. ; Terminate8087 bad if original INT 2 vector was 0
  60. ; Changed call to fpsignal routine - now registers
  61. ; except for AX are good. al = error code
  62. ;
  63. ; 08/23/84 Greg Whitten
  64. ; corrected COMPSIDI (COMPcsSIDI)
  65. ; affects routines using log and atan's
  66. ;
  67. ; 08/25/84 Greg Whitten
  68. ; fixed bug with handling of denormals - not reloading
  69. ; zero from the correct address
  70. ;
  71. ; 10/28/84 Greg Whitten
  72. ; added environment segment to initialization for NO87
  73. ; added code to save and restore interrupt vectors
  74. ; 8087 only version
  75. ;
  76. ; 01/30/85 Greg Whitten
  77. ; added OEM version check for automatic setup for 8087
  78. ; this is not necessarily reliable
  79. ;
  80. ; 02/07/85 Greg Whitten
  81. ; split OEM customization out into separate module
  82. ; save and restore old interrupt vector values
  83. ;
  84. ; release C 3.00 and FORTRAN/Pascal 3.30
  85. ;
  86. ; 03/29/85 Greg Whitten
  87. ; changed emulated FWAIT fixups to mov ax,ax
  88. ; changed real 287 FWAIT on numeric instructions to NOPs
  89. ;
  90. ; release IBM C 1.0
  91. ;
  92. ; 08/13/85 Greg Whitten
  93. ; changed fpmath trunc routines to check for errors
  94. ;
  95. ; 08/22/85 Greg Whitten
  96. ; added PUB/GLB macros to define public symbols
  97. ; for debugging
  98. ;
  99. ; 08/22/85 Greg Whitten
  100. ; corrected a bug in denormalizing result with
  101. ; zero mantissa and non-zero exponent
  102. ; changed to zero exponent if mantissa is zero
  103. ;
  104. ; release FORTRAN/Pascal 3.31
  105. ;
  106. ; 09/02/85 Greg Whitten
  107. ; completed adding PUB/GLB macros to define
  108. ; public symbols for debugging
  109. ;
  110. ; 09/09/85 Greg Whitten
  111. ; changed denormal exception handler for
  112. ; faster normalization algorithm using 8087
  113. ; FDIV[R] denormal memory operand
  114. ;
  115. ; 09/13/85 Jamie Bariteau
  116. ; added comments to invalid processing in emexcept.asm
  117. ; fixed bug in constant instruction decoding in emexcept
  118. ; (stand-alone version only)
  119. ;
  120. ; 09/30/85 Jamie Bariteau
  121. ; start of C and FORTRAN 4.0 changes
  122. ; emulator.asm:
  123. ; changed memory temp REG8087ST2 to REG8087ST0
  124. ; since ST(2) is no longer saved to memory but
  125. ; ST(0) is.
  126. ; emexcept.asm:
  127. ; rewrote invalid exception handling to deal with
  128. ; new stack overflow/underflow model
  129. ;
  130. ; 10/30/85 Greg Whitten
  131. ; 11/03/85 more C and FORTRAN 4.0 changes
  132. ; embedded version information for debugger
  133. ; reordered data area
  134. ; deleted unused data items
  135. ; added UserStatusWord for status reporting
  136. ; added __fpmath call for returning status
  137. ; changed denormal handler so precision is not lost
  138. ; on FMUL denormal
  139. ;
  140. ; 11/18/85 Jamie Bariteau
  141. ; more C and Fortran 4.0 changes
  142. ; emulated new set of arithmetic register instructions:
  143. ; f<op> ST,ST(x)
  144. ; f<op> ST(x),ST
  145. ; f<op>p ST,ST(x)
  146. ;
  147. ; 11/19/85 Greg Whitten
  148. ; (hack) change temp real denormals into 0 in normalize
  149. ; some temp real denormals will not be caught
  150. ;
  151. ; 02/11/86 Greg Whitten
  152. ; changed around some conditionals and removed unused
  153. ; conditionals (MSDOS and XENIX)
  154. ;
  155. ; 02/11/86 Greg Whitten
  156. ; created frontend -only version of emulator
  157. ; assumes no 8087 and limited instructions
  158. ; (no transcendentals)
  159. ;
  160. ; 02/12/86 Greg Whitten
  161. ; corrected bug in exception handler with user status
  162. ;
  163. ; 03/20/86 Greg Whitten
  164. ; fixed special arithmetic returns to use RESULT
  165. ;
  166. ; Version 4.00C 4.0
  167. ;
  168. ; 07/15/86 Greg Whitten
  169. ; added dual DOS 5.0 and DOS 3.x support
  170. ; added standalone and DOS 5 conditionals
  171. ;
  172. ; 09/25/86 Greg Whitten
  173. ; added FCOM denormal exception support
  174. ; added pseudo-zero checking to denormal exceptions
  175. ;
  176. ; 10/14/86 Greg Whitten
  177. ; 386 version of the emulator for XENIX
  178. ; added XENIX and i386 conditionals
  179. ;
  180. ; 10/09/86 Jamie Bariteau
  181. ; Changed initialization of LIMstk to allow
  182. ; more space between the end of the emulator
  183. ; stack and DGROUP. The emulator was trashing
  184. ; DS:0 before aborting with fp stack overflow.
  185. ;
  186. ; 10/15/86 Barry McCord
  187. ; fixed no87= message to use DOSWRITE for
  188. ; the DOS3/5 version of the emulator
  189. ;
  190. ; 01/02/87 Barry McCord
  191. ; added FPREM emulation into the DOS3/5 version
  192. ; of the emulator
  193. ;
  194. ; 02/12/87 Barry McCord
  195. ; changed coprocessor detection mask in
  196. ; EMINIT.ASM from 1F3Fh to 0F3Fh to allow
  197. ; for A1 stepping of 80387, in which bit
  198. ; 1000h of the control word remains high.
  199. ;
  200. ; 03/03/87 Greg Whitten
  201. ; added QB3 support (special hacked emulator)
  202. ;
  203. ; 04/01/87 Greg Whitten
  204. ; merged sources for OS/2 and XENIX emulators
  205. ; minor cleanup
  206. ; - removed PCDOS switch
  207. ;
  208. ; Version 5.00
  209. ;
  210. ; 04/09/87 Barry McCord
  211. ; added WINDOWS switch for Windows 2.00 support
  212. ;
  213. ; 05/01/87 Jamie Bariteau
  214. ; moved FPREM data from emfprem.asm to emulator.asm
  215. ; so that fptaskdata marks the end of the data area
  216. ;
  217. ; 05/04/87 Barry McCord
  218. ; changed DOSWRITE to __DOSWRITE, etc.
  219. ; for the DOS 3/5 emulator
  220. ;
  221. ; 05/05/87 Greg Whitten
  222. ; XENIX 286/386 cleanup
  223. ;
  224. ; 05/14/87 Barry McCord
  225. ; added exception handling support to "quiet"
  226. ; the Invalid exception generated by fld (short/long
  227. ; real operand) of an SNaN (only matters for 80387);
  228. ; this was so that the compiler can do FLDs without
  229. ; being concerned whether the (possibly stack-based)
  230. ; floating-point variable has been initialized.
  231. ;
  232. ; 06/19/87 Barry McCord
  233. ; Windows 2.00 support ready for Windows SDK Beta 1
  234. ;
  235. ; 06/24/87 Barry McCord
  236. ; Bug fix (BCP #1767) for FORTRAN 4.01.
  237. ; Exception handler wasn't loading ST(1) from
  238. ; memory when ST(0) was full but ST(1) was not
  239. ; (for instructions taking 2 stack operands).
  240. ;
  241. ; 08/24/87 Barry McCord
  242. ; Added emulation of fild qword ptr
  243. ; and fistp qword ptr for the purpose of supporting
  244. ; unsigned-long-to-float and float-to-unsigned-long
  245. ; conversions for C 5.00.
  246. ;
  247. ; release C 5.00 / QuickC 1.00 / QuickBASIC 4.00
  248. ; 10/19/87
  249. ;
  250. ; Version 5.10
  251. ;
  252. ; 11/07/87 Greg Whitten
  253. ; added PCDOS (ifdef-style) switch back in for IBM Japan
  254. ; added polling-style interrupt handler to eliminate
  255. ; interrupt problem in real mode
  256. ;
  257. ; 11/11/87 Barry McCord
  258. ; Corrected FORTRAN bug fix (06/24/87 above)
  259. ; by changing a JMP instruction in emexcept.asm.
  260. ; Corrected DOS5only initialization in emdos.asm;
  261. ; missing JMP caused CW not to be initialized.
  262. ;
  263. ; 11/12/87 Barry McCord
  264. ; Added OS/2 support for a reentrant/dynalinkable
  265. ; run-time (IBM/Dallas model). Used DOSALLOCSEG
  266. ; to allocate per-thread emulator data areas. The
  267. ; segment selectors are stored in an array and indexed
  268. ; by thread ID.
  269. ;
  270. ; 12/08/87 Greg Whitten
  271. ; put new exception handling code under POLLING switch
  272. ;
  273. ; 01/11/88 Barry McCord
  274. ; eliminated assembler error in i386 version
  275. ; of emfrndi.asm
  276. ;
  277. ; 01/21/88 Barry McCord
  278. ; replaced QB4 switch with _NOSTKEXCHLR, since
  279. ; QB4 updates no longer use the switch
  280. ;
  281. ; 03/16/89 WAJ
  282. ; Fixed bug in emt.lib/87t.lib. __fpsignal was being
  283. ; called with the wrong value.
  284. ;
  285. ; 03/24/89 WAJ
  286. ; Fixed bug in emmt.lib/87mt.lib. In emerror.asm, the
  287. ; address of user's FP signal handler was not being
  288. ; removed from stack.
  289. ;
  290. ; 03/26/89 WAJ
  291. ; Added ifdefs for the SMALL_EMULATOR for BASIC
  292. ;
  293. ; 04/02/89 WAJ
  294. ; Added special emmtsql version that will let SQL
  295. ; switch stacks with emmt.lib.
  296. ;
  297. ; 04/06/89 WAJ
  298. ; Updated win87em.exe
  299. ;
  300. ; 04/07/89 WAJ
  301. ; Moved history from emulator.asm into emulator.hst
  302. ; Moved some macros into emulator.inc
  303. ;
  304. ;
  305. ; 04/09/89 WAJ
  306. ; Added standard header file to most of the emulator files.
  307. ; Added ProfBegin and ProfEnd macros for profiling.
  308. ;
  309. ; 04/10/89 WAJ
  310. ; Added code to emerror.asm and emfixfly.asm to handle EMS
  311. ; segments in ds under Windows when calling the user's floating
  312. ; point excpetion handler.
  313. ;
  314. ; 04/12/89 WAJ Added NOPs to ProfBegin and ProfEnd
  315. ;
  316. ; 04/12/89 WAJ Polling emulator now uses a "retf 2" instead of "iret"
  317. ;
  318. ; 04/27/89 WAJ Made several changes to Windows emulator to support
  319. ; protected Win386. Removed all writes into code segments.
  320. ;
  321. ; 04/28/89 WAJ Added RESIDENTNAME to win87em.def.
  322. ;
  323. ; 04/30/89 WAJ Added several "even" statements to emarith.asm
  324. ;
  325. ; 05/02/89 WAJ Added instruction look ahead and several minor spead ups.
  326. ;
  327. ; 05/12/89 WAJ Added sti to "retf 2" in Windows emulator.
  328. ;
  329. ; 05/16/89 WAJ Fixed bug in look ahead code (emmain.asm). Segment override
  330. ; followed by bp address would use the wrong segment.
  331. ;
  332. ; 05/39/89 WAJ Now includes cmacros.inc. Just used for segments at the
  333. ; moment.
  334. ;
  335. ; 05/39/89 WAJ Added emqp.lib for Quick Pascal to build.
  336. ;
  337. ; 06/05/89 WAJ Fixed bug in BIGNAN (in emarith.asm). Wasn't returning
  338. ; NAN with biggest mantissa.
  339. ;
  340. ; 06/06/89 WAJ "fldz" was not giving the same results as "fld [zero]"
  341. ;
  342. ; 06/12/89 WAJ Changed AllExceptionsHandled in emexcept.asm so that user
  343. ; can mask invalid exceptions.
  344. ;
  345. ; 06/20/89 WAJ win87em.exe is now marked as a Windows 3.0 exe.
  346. ; win87em2.exe is the Windows 2.0 version. win87em.def is
  347. ; now used just to make the win87em.lib implib.
  348. ;
  349. ; 06/02/89 WAJ win87em.exe's version number is now 6.00.03
  350. ;
  351. ; 06/28/89 WAJ Added save/restore to emwin.asm for win87em.exe. Also,
  352. ; added the file win87em.h.
  353. ;
  354. ; 07/05/89 WAJ Removed fixup externals from QuickPascal emulator.
  355. ;
  356. ; 07/18/89 WAJ Added __fpemulatorbegin and __fpemulatorend labels.
  357. ;
  358. ; 08/01/89 WAJ Added check for reg, reg operation to ProcessDenormal in
  359. ; emexcept.asm
  360. ;
  361. ; 09/06/89 WAJ Fixed bug in emfmul.asm. Needed "xor ebp, ebp" after PROD2.
  362. ;
  363. ; 09/21/89 WAJ Started merging in 386 version.
  364. ;
  365. ; 01/22/90 WAJ win87em.dll now check __WINFLAGS to remove STI if pmode.
  366. ; 01/22/90 WAJ win87em.dll version numbers is incremented to 6.00.04.
  367. ;
  368. ; 02/02/90 WAJ Changed "retf 2" in win87em.dll into iret.
  369. ; 02/02/90 WAJ win87em.dll version numbers is incremented to 6.00.05.
  370. ;
  371. ; 02/02/90 WAJ In win87em.dll, skips sti if WF_PMODE and WF_WIN386.
  372. ; 02/02/90 WAJ win87em.dll version numbers is incremented to 6.00.06.
  373. ; 04/06/90 WAJ Fixed win87em.dll exception problems. Version 6.00.07.
  374. ; 04/10/90 WAJ Added fsetpm to init. Added "out f0, 0". Version 6.00.08.
  375. ; 04/11/90 WAJ Win exception handler could set ES=0. Added NUL_JMP.
  376. ; Version 6.00.09.
  377. ; 04/12/90 WAJ Win87em.dll now inits chip for each app. Now uses INT 11h.
  378. ; Version 6.00.10
  379. ; 04/17/90 WAJ Win87em.dll now uses protexception for 286/287 PS/2'ss.
  380. ; Version 6.00.11
  381. ; 05/14/92 JWM Added DonC's WINFAST code; changes to emulator.asm, emerror.asm
  382. ; emfixfly.asm, emwin.asm; also added fwait to "reset" in
  383. ; emwin.asm, to fix 80387 bug.
  384. ;
  385. ;*******************************************************************************