home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / g / gtak212.zip / OS2-ST01 / devhlp.inc < prev    next >
Text File  |  1991-05-31  |  4KB  |  115 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_Block        EQU     4    ;  4    Block on event
  13. DevHlp_Run        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_AttachDD        equ    2Ah    ;    Attack a device driver
  63.  
  64. DevHlp_InternalError    equ    2Bh    ;    Panic
  65.  
  66. DevHlp_AllocGDTSel    EQU    45    ; 2D    Allocate GDT Selectors
  67. DevHlp_PhysToGDTSel    EQU    46    ; 2E    Convert phys addr to GDT sel
  68. DevHlp_RealToProt    EQU    47    ; 2F    Change from real to protected mode
  69. DevHlp_ProtToReal    EQU    48    ; 30    Change from protected to real mode
  70.  
  71. DevHlp_EOI        EQU    49    ; 31    Send EOI to PIC
  72. DevHlp_UnPhysToVirt    EQU    50    ; 32    mark completion of PhysToVirt
  73. DevHlp_TickCount    EQU    51    ; 33    modify timer
  74.  
  75. DevHlp_GetLIDEntry    equ    34h
  76. DevHlp_FreeLIDEntry    equ    35h
  77. DevHlp_ABIOSCall    equ    36h
  78. DevHlp_ABIOSCommonEntry    equ    37h
  79.  
  80. DevHlp_RegisterStackUse equ    38h
  81.  
  82. DevHlp_VideoPause    equ    3Ch
  83. DevHlp_DispMsg        equ    3Dh
  84.  
  85.  
  86. event_SM_Mou            equ     0       ; event was Session Manager-mouse@@
  87.     event_MUF           equ     0       ; (OBSOLETE) event was muf key
  88. event_CtrlBrk           equ     1       ; event was Ctrl-Break
  89. event_CtrlC             equ     2       ; event was Ctrl-C
  90. event_CtrlScrLk         equ     3       ; event was Ctrl-ScrollLock
  91. event_CtrlPrtSc         equ     4       ; event was Ctrl-PrtSc
  92. event_ShftPrtSc         equ     5       ; event was Shift-PrtSc
  93. event_SM_Kbd            equ     6       ; event was Session Manager -keyboard@@
  94. event_count             equ     7       ; @@ Number of possible events
  95.  
  96. ;       Character Queue structure
  97. ;
  98. ;       QueueInit must be called before any other queue manipulation
  99. ;       subroutine.  The Qsize field must be initialized before
  100. ;       calling QueueInit.
  101.  
  102. CharQueue STRUC
  103.         Qsize   DW      ?               ; Size of queue in bytes
  104.         Qchrout DW      ?               ; Index of next char out
  105.         Qcount  DW      ?               ; Count of characters in the queue
  106.         Qbase   DB      ?               ; Queue buffer
  107. CharQueue ENDS
  108.  
  109. RASrouter struc
  110.         pretrace_addr   dw      0
  111.         preminor        dw      0
  112.         posttrace_addr  dw      0
  113.         postminor       dw      0
  114. RASrouter ends
  115.