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.

89 lines
1.9 KiB

  1. title "Pnp Bios Bus Extender ASM support routines"
  2. ;++
  3. ;
  4. ; Copyright (c) Microsoft Corporation. All rights reserved.
  5. ;
  6. ; Module Name:
  7. ;
  8. ; pbiosa.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This file contains Pnp Bios ASM support routines.
  13. ;
  14. ; Author:
  15. ;
  16. ; Shie-Lin Tzong (shielint) Jan 15, 1998
  17. ;
  18. ; Environment:
  19. ;
  20. ; Kernel mode only.
  21. ;
  22. ; Revision History:
  23. ;
  24. ;--
  25. .386p
  26. .xlist
  27. include callconv.inc ; calling convention macros
  28. .list
  29. EXTRNP _RtlMoveMemory, 3
  30. EXTRNP _KeI386Call16BitCStyleFunction, 4
  31. PAGELK SEGMENT DWORD PUBLIC 'CODE'
  32. ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
  33. ;++
  34. ;
  35. ; VOID
  36. ; PbCallPnpBiosWorker (
  37. ; IN ULONG EntryOffset,
  38. ; IN ULONG EntrySelector,
  39. ; IN PUSHORT Parameters,
  40. ; IN ULONG ParameterSize
  41. ; );
  42. ;
  43. ; Routine Description:
  44. ;
  45. ; This routines copies the specified parameters to stack and invokes
  46. ; Pnp Bios Entry point.
  47. ;
  48. ; Arguments:
  49. ;
  50. ; EntryOffset and EntrySelector - supplies the entry point of the bios function.
  51. ;
  52. ; Parameters - Supplies a pointer to argument block.
  53. ;
  54. ; ParameterSize - Size of the argument block
  55. ;
  56. ; Return Value:
  57. ;
  58. ; Registers/context contains the register values returned from pnp bios.
  59. ;
  60. ;--
  61. EntryOffset equ [ebp + 8]
  62. EntrySelector equ [ebp + 12]
  63. Parameters equ [ebp + 16]
  64. ParameterSize equ [ebp + 20]
  65. cPublicProc _PbCallPnpBiosWorker, 4
  66. push ebp
  67. mov ebp, esp
  68. sub esp, ParameterSize
  69. mov eax, esp
  70. stdCall _RtlMoveMemory, <eax, Parameters, ParameterSize>
  71. stdCall _KeI386Call16BitCStyleFunction, <EntryOffset, EntrySelector, Parameters, ParameterSize>
  72. mov esp, ebp
  73. pop ebp
  74. stdRET _PbCallPnpBiosWorker
  75. stdENDP _PbCallPnpBiosWorker
  76. PAGELK ends
  77. end