home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / TESTCFG / TESTCFGA.INC < prev   
Text File  |  1995-04-14  |  3KB  |  106 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  4. ;
  5. ;    The following IBM OS/2 WARP source code is provided to you solely for
  6. ;    the purpose of assisting you in your development of OS/2 WARP device
  7. ;    drivers. You may use this code in accordance with the IBM License
  8. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  9. ;    Copyright statement may not be removed.;
  10. ;*****************************************************************************/
  11. ;       SCCSID = @(#)testcfga.inc       6.1 92/01/09
  12.  
  13. ;*** TESTCFGA.INC - TESTCFG Device Driver Assemby Include file
  14. ;*
  15. ;*
  16. ;*
  17. ;*
  18. ;*   DESCRIPTION
  19. ;*
  20. ;*     DEVHLP equates and macros
  21. ;*
  22. ;*   MODIFICATION HISTORY
  23. ;*
  24. ;* 6.1  01/15/92 CP20 B731???  Jeff Muir   Original Version
  25. ;*
  26.  
  27.  
  28. ; [bp+base] is the first parameter on the stack for the assembly
  29. ; routines if being called from C.  base can be changed for near or far.
  30. ; base is 4 for near calls, 6 for far.
  31. nbase       equ     4
  32. fbase       equ     6
  33.  
  34. ;
  35. ;  APM_Info structure
  36. ;
  37. APM_Info struc
  38.    APM_CodeSeg     DW      ?
  39.    APM_DataSeg     DW      ?
  40.    APM_Offset      DW      ?
  41.    APM_Flags       DW      ?
  42.    APM_Level       DW      ?
  43.    APM_IdleHookRtn DF      ?
  44. APM_Info ends
  45.  
  46.  
  47. ;
  48. ; Simple macro to guarantee far c entry point for assembly routine.
  49. ;
  50. FCPROC   MACRO   NAME
  51. public  NAME
  52. NAME   PROC    FAR
  53.        push    bp
  54.        mov     bp,sp
  55.        ENDM
  56.  
  57. ;
  58. ; Simple macro for exiting assembly routine back to C.
  59. ;
  60. ENDFCPROC MACRO   NAME
  61.         pop     bp
  62.         retf
  63. NAME    endp
  64.         ENDM
  65.  
  66. ;
  67. ; Simple macro to guarantee near C entry point for assembly routine.
  68. ;
  69. NCPROC   MACRO   NAME
  70. public  NAME
  71. NAME   PROC    NEAR
  72.        push    bp
  73.        mov     bp,sp
  74.        ENDM
  75.  
  76. ;
  77. ; Simple macro for exiting assembly routine back to C.
  78. ;
  79. ENDNCPROC MACRO   NAME
  80.         pop     bp
  81.         ret
  82. NAME    endp
  83.         ENDM
  84.  
  85. ;
  86. ; DEVHELP Equates used by TESTCFG
  87. ;
  88.  
  89. DevHlp_ProcBlock        EQU      4      ;  4    Block process
  90. DevHlp_ProcRun          EQU      5      ;  5    Run a blocked process
  91.  
  92. DevHlp_PhysToVirt       EQU     21      ; 15    convert physical address to virtual
  93. DevHlp_VirtToPhys       EQU     22      ; 16    convert virtual address to physical
  94. DevHlp_PhysToUVirt      EQU     23      ; 17    convert physical to LDT
  95.  
  96. DevHlp_GetDOSVar        EQU     36      ; 24    Return pointer to DOS variable
  97.  
  98. DevHlp_VerifyAccess     EQU     39      ; 27    Verify access to memory
  99.  
  100. DevHlp_UnPhysToVirt     EQU     50      ; 32    mark completion of PhysToVirt
  101.  
  102. DevHlp_GetLIDEntry      EQU     52      ; 34    Obtain Logical ID
  103. DevHlp_FreeLIDEntry     EQU     53      ; 35    Release Logical ID
  104. DevHlp_ABIOSCall        EQU     54      ; 36    Call ABIOS
  105.  
  106.