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.

46 lines
1.3 KiB

  1. subttl emfinit.asm - Emulator initialization and FINIT instruction
  2. page
  3. ;*******************************************************************************
  4. ;emfinit.asm - Emulator initialization and FINIT instruction
  5. ;
  6. ; Microsoft Confidential
  7. ;
  8. ; Copyright (c) Microsoft Corporation 1991
  9. ; All Rights Reserved
  10. ;
  11. ;Revision History:
  12. ;
  13. ; [] 09/05/91 TP Initial 32-bit version.
  14. ;
  15. ;*******************************************************************************
  16. EM_ENTRY eEmulatorInit
  17. EmulatorInit:
  18. EM_ENTRY eFINIT
  19. eFINIT:
  20. mov esi,BEGstk
  21. mov EMSEG:[CURstk],INITstk
  22. mov ecx,Numlev
  23. xor eax,eax
  24. EmInitLoop:
  25. mov EMSEG:[esi].ExpSgn,bTAG_EMPTY ;Exponent and sign are zero
  26. mov EMSEG:[esi].lManHi,eax
  27. mov EMSEG:[esi].lManLo,eax
  28. add esi, Reg87Len
  29. loop EmInitLoop
  30. mov EMSEG:[StatusWord],ax ; clear status word
  31. mov [esp+4].OldStatus,ax ; clear saved status word.
  32. mov EMSEG:[PrevCodeOff],eax
  33. mov EMSEG:[PrevDataOff],eax
  34. mov EMSEG:[LongControlWord],InitControlWord
  35. mov eax,offset Round64near
  36. mov EMSEG:[RoundMode],eax ;Address of round routine
  37. mov EMSEG:[TransRound],eax ;Address of round routine
  38. mov EMSEG:[SavedRoundMode],eax
  39. mov EMSEG:[ZeroVector],offset SaveResult
  40. mov EMSEG:[Einstall], 1
  41. ret