Source code of Windows XP (NT5)
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.

84 lines
1.2 KiB

  1. /* xmsmisc.c - Misc. Support Functions for himem.
  2. *
  3. * xmsSysPageSize
  4. * xmsQueryExtMem
  5. *
  6. * Modification History:
  7. *
  8. * Sudeepb 15-May-1991 Created
  9. */
  10. #include "xms.h"
  11. #include <xmssvc.h>
  12. #include <softpc.h>
  13. extern void UpdateKbdInt15(WORD Seg,WORD Off);
  14. /* xmsSysPageSize - Get the System Page size.
  15. *
  16. *
  17. * Entry - None
  18. *
  19. * Exit
  20. * SUCCESS
  21. * Client (AX) = Page Size in bytes
  22. *
  23. * FAILURE
  24. * Not Valid
  25. */
  26. VOID xmsSysPageSize (VOID)
  27. {
  28. SYSTEM_INFO SysInfo;
  29. GetSystemInfo(&SysInfo);
  30. setAX((USHORT)SysInfo.dwPageSize);
  31. return;
  32. }
  33. /* xmsQueryExtMem - Get the extended memory for the vdm
  34. *
  35. *
  36. * Entry - None
  37. *
  38. * Exit
  39. * SUCCESS
  40. * Client (AX) = Extended Memory in K
  41. *
  42. * FAILURE
  43. * Not Valid
  44. */
  45. VOID xmsQueryExtMem (VOID)
  46. {
  47. setAX((USHORT)(xmsMemorySize));
  48. return;
  49. }
  50. /* xmsNotifyHookI15 - Informs softpc that someone is hooking I15
  51. * - also returns the extended memory for the vdm
  52. *
  53. *
  54. * Entry - Client (CS:AX) seg:off of new I15 vector
  55. *
  56. * Exit
  57. * SUCCESS
  58. * Client (CX) = Extended Memory in K
  59. *
  60. * FAILURE
  61. * Not Valid
  62. */
  63. VOID xmsNotifyHookI15 (VOID)
  64. {
  65. UpdateKbdInt15(getCS(), getAX());
  66. setCX((USHORT)(xmsMemorySize));
  67. return;
  68. }