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.

66 lines
1.1 KiB

  1. TITLE MAPDATA - Map DS to kernel's data segment
  2. include kernel.inc
  3. ; This code could go almost anywhere, but didn't really belong in kdata.asm
  4. sBegin NRESCODE
  5. assumes CS,NRESCODE
  6. assumes DS,NOTHING
  7. assumes ES,NOTHING
  8. assumes SS,NOTHING
  9. KDataSeg dw seg _DATA
  10. public KDataSeg
  11. cProc MapDStoDATA,<PUBLIC,NEAR>
  12. cBegin nogen
  13. ;;; push ax
  14. ;;; mov ax,seg _DATA
  15. ;;; mov ds,ax
  16. ;;; pop ax
  17. mov ds, cs:KDataSeg
  18. ret
  19. cEnd nogen
  20. sEnd NRESCODE
  21. sBegin MISCCODE
  22. assumes cs, misccode
  23. assumes ds, nothing
  24. assumes es, nothing
  25. assumes ss, nothing
  26. MKDataSeg dw seg _DATA
  27. public MKDataSeg
  28. cProc MISCMapDStoDATA,<PUBLIC,NEAR>
  29. cBegin nogen
  30. ;;; push ax
  31. ;;; mov ax,seg _DATA
  32. ;;; mov ds,ax
  33. ;;; pop ax
  34. mov ds, cs:MKDataSeg
  35. ret
  36. cEnd nogen
  37. if 0 ;----------------------------------------------------------------
  38. cProc MISCMapEStoDATA,<PUBLIC,NEAR>
  39. cBegin nogen
  40. ;;; push ax
  41. ;;; mov ax,seg _DATA
  42. ;;; mov es,ax
  43. ;;; pop ax
  44. mov es, cs:MKDataSeg
  45. ret
  46. cEnd nogen
  47. endif ;----------------------------------------------------------------
  48. sEnd MISCCODE
  49. end