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.

100 lines
2.2 KiB

  1. page ,132
  2. if 0
  3. /*++
  4. Copyright (c) 1991 Microsoft Corporation
  5. Module Name:
  6. msgapi.asm
  7. Abstract:
  8. This module contains the messenger functions that we marginally support
  9. for VDM
  10. MessengerDispatch
  11. Author:
  12. Richard L Firth (rfirth) 21-Sep-1992
  13. Environment:
  14. Dos mode only
  15. Revision History:
  16. 05-Sep-1991 rfirth
  17. Created
  18. --*/
  19. endif
  20. .xlist ; don't list these include files
  21. .xcref ; turn off cross-reference listing
  22. include dosmac.inc ; Break macro etc (for following include files only)
  23. include error.inc ; DOS errors - ERROR_INVALID_FUNCTION
  24. include segorder.inc ; segments
  25. include debugmac.inc ; DbgPrint macro
  26. include localmac.inc ; DbgPrint macro
  27. include asmmacro.inc ; language extensions
  28. include rdrsvc.inc ; BOP and SVC macros/dispatch codes
  29. include rdrmisc.inc ; miscellaneous definitions
  30. .cref ; switch cross-reference back on
  31. .list ; switch listing back on
  32. subttl ; kill subtitling started in include file
  33. .286
  34. ResidentCodeStart
  35. assume cs:ResidentCode
  36. assume ds:nothing
  37. assume es:nothing
  38. assume ss:nothing
  39. MessengerDispatchTable label word
  40. dw MessageInstalled
  41. dw MessageDone
  42. dw MessageLogging
  43. dw MessageUserFunction
  44. dw MessageUnusedFunction
  45. dw MessagePauseContinue
  46. LAST_MESSENGER_FUNCTION = (offset $ - offset MessengerDispatchTable)/2 - 1
  47. public MessengerDispatch
  48. MessengerDispatch proc near
  49. cmp al,LAST_MESSENGER_FUNCTION
  50. jbe @f
  51. mov al,ERROR_INVALID_PARAMETER
  52. stc
  53. ret
  54. @@: cbw
  55. push bx
  56. mov bx,ax
  57. shl bx,1
  58. mov ax,MessengerDispatchTable[bx]
  59. pop bx
  60. jmp ax
  61. MessengerDispatch endp
  62. MessageInstalled:
  63. dec al
  64. MessageDone:
  65. ret
  66. MessageLogging:
  67. MessageUserFunction:
  68. MessageUnusedFunction:
  69. MessagePauseContinue:
  70. ; mov ax,ERROR_INVALID_FUNCTION
  71. mov ax,2142 ; NERR_InvalidAPI
  72. stc
  73. retn
  74. ResidentCodeEnd
  75. end