home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / ms / s12349 / devhlp.inc < prev    next >
Text File  |  1989-06-06  |  5KB  |  102 lines

  1. ;
  2. ; Copyright (c) Microsoft Corporation,  1988
  3. ;
  4. ;
  5. SUBTTL  DevHlp - Definitions for device driver helper functions
  6.  
  7. DevHlp_SchedClock       EQU      0      ;  0    Called each timer tick
  8. DevHlp_DevDone          EQU      1      ;  1    Device I/O complete
  9. DevHlp_Yield            EQU      2      ;  2    yield CPU if resched set
  10. DevHlp_TCYield          EQU      3      ;  3    yield to time critical task
  11.  
  12. DevHlp_ProcBlock        EQU      4      ;  4    Block on event
  13. DevHlp_ProcRun          EQU      5      ;  5    Unblock process
  14.  
  15. DevHlp_SemRequest       EQU      6      ;  6    claim a semaphore
  16. DevHlp_SemClear         EQU      7      ;  7    release a semaphore
  17. DevHlp_SemHandle        EQU      8      ;  8    obtain a semaphore handle
  18.  
  19. DevHlp_PushRequest      EQU      9      ;  9    Push the request
  20. DevHlp_PullRequest      EQU     10      ;  A    Pull next request from Q
  21. DevHlp_PullParticular   EQU     11      ;  B    Pull a specific request
  22. DevHlp_SortRequest      EQU     12      ;  C    Push request in sorted order
  23.  
  24. DevHlp_AllocReqPacket   EQU     13      ;  D    allocate request packet
  25. DevHlp_FreeReqPacket    EQU     14      ;  E    free request packet
  26.  
  27. DevHlp_QueueInit        EQU     15      ;  F    Init/Clear char queue
  28. DevHlp_QueueFlush       EQU     16      ; 10    flush queue
  29. DevHlp_QueueWrite       EQU     17      ; 11    Put a char in the queue
  30. DevHlp_QueueRead        EQU     18      ; 12    Get a char from the queue
  31.  
  32. DevHlp_Lock             EQU     19      ; 13    Lock segment
  33. DevHlp_Unlock           EQU     20      ; 14    Unlock segment
  34.  
  35. DevHlp_PhysToVirt       EQU     21      ; 15    convert physical address to virtual
  36. DevHlp_VirtToPhys       EQU     22      ; 16    convert virtual address to physical
  37. DevHlp_PhysToUVirt      EQU     23      ; 17    convert physical to LDT
  38. DevHlp_UnPhysToVirt    EQU    50    ; 32    done with phystovirt selector.    
  39.  
  40. DevHlp_AllocPhys        EQU     24      ; 18    allocate physical memory
  41. DevHlp_FreePhys         EQU     25      ; 19    free physical memory
  42.  
  43. DevHlp_SetROMVector     EQU     26      ; 1A    set a ROM service routine vector
  44. DevHlp_SetIRQ           EQU     27      ; 1B    set an IRQ interrupt
  45. DevHlp_UnSetIRQ         EQU     28      ; 1C    unset an IRQ interrupt
  46.  
  47. DevHlp_SetTimer         EQU     29      ; 1D    set timer request handler
  48. DevHlp_ResetTimer       EQU     30      ; 1E    unset timer request handler
  49.  
  50. DevHlp_MonitorCreate    EQU     31      ; 1F    create a monitor
  51. DevHlp_Register         EQU     32      ; 20    install a monitor
  52. DevHlp_DeRegister       EQU     33      ; 21    remove a monitor
  53. DevHlp_MonWrite         EQU     34      ; 22    pass data records to monitor
  54. DevHlp_MonFlush         EQU     35      ; 23    remove all data from stream
  55.  
  56. DevHlp_GetDOSVar        EQU     36      ; 24    Return pointer to DOS variable
  57. DevHlp_SendEvent        EQU     37      ; 25    an event occurred
  58. DevHlp_ROMCritSection   EQU     38      ; 26    ROM Critical Section
  59. DevHlp_VerifyAccess    EQU    39    ; 27    Verify access to memory
  60. DevHlp_RAS        EQU    40    ; 28    Put info in RAS trace buffer
  61.  
  62. DevHlp_AllocGDTSel      EQU     45      ; 2D    Allocate GDT Selectors
  63. DevHlp_PhysToGDTSel     EQU     46      ; 2E    Convert phys addr to GDT sel
  64. DevHlp_RealToProt       EQU     47      ; 2F    Change from real to protected mode
  65. DevHlp_ProtToReal       EQU     48      ; 30    Change from protected to real mode
  66.  
  67. DevHlp_EOI              EQU     49      ; 31    Send EOI to PIC
  68. DevHlp_UnPhysToVirt     EQU     50      ; 32    mark completion of PhysToVirt
  69. DevHlp_TickCount        EQU     51      ; 33    modify timer
  70.                     ; 34-37 Not used
  71.  
  72.  
  73. event_SM_Mou            equ     0       ; event was Session Manager-mouse@@
  74.     event_MUF           equ     0       ; (OBSOLETE) event was muf key
  75. event_CtrlBrk           equ     1       ; event was Ctrl-Break
  76. event_CtrlC             equ     2       ; event was Ctrl-C
  77. event_CtrlScrLk         equ     3       ; event was Ctrl-ScrollLock
  78. event_CtrlPrtSc         equ     4       ; event was Ctrl-PrtSc
  79. event_ShftPrtSc         equ     5       ; event was Shift-PrtSc
  80. event_SM_Kbd            equ     6       ; event was Session Manager -keyboard@@
  81. event_count             equ     7       ; @@ Number of possible events
  82.  
  83. ;       Character Queue structure
  84. ;
  85. ;       QueueInit must be called before any other queue manipulation
  86. ;       subroutine.  The Qsize field must be initialized before
  87. ;       calling QueueInit.
  88.  
  89. CharQueue STRUC
  90.         Qsize   DW      ?               ; Size of queue in bytes
  91.         Qchrout DW      ?               ; Index of next char out
  92.         Qcount  DW      ?               ; Count of characters in the queue
  93.         Qbase   DB      ?               ; Queue buffer
  94. CharQueue ENDS
  95.  
  96. RASrouter struc
  97.         pretrace_addr   dw      0
  98.         preminor        dw      0
  99.         posttrace_addr  dw      0
  100.         postminor       dw      0
  101. RASrouter ends
  102.