home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / INC_DBCS / MVDM.INC < prev    next >
Text File  |  1995-04-14  |  6KB  |  277 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT (C) Microsoft Corporation, 1989
  4. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  5. ;
  6. ;    The following IBM OS/2 WARP source code is provided to you solely for
  7. ;    the purpose of assisting you in your development of OS/2 WARP device
  8. ;    drivers. You may use this code in accordance with the IBM License
  9. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  10. ;    Copyright statement may not be removed.;
  11. ;*****************************************************************************/
  12. ;***    MVDM.INC
  13. ;
  14. ;
  15. ;    MVDM constants and types
  16. ;
  17. ;    Include file hierarchy:
  18. ;
  19. ;      mvdm.inc
  20. ;        basemac.inc
  21. ;        basedef.inc
  22. ;        vdmprop.inc
  23. ;        vdmm.inc
  24. ;        v8086.inc
  25. ;        vdos.inc
  26. ;        vpic.inc
  27. ;        vdmbios.inc
  28. ;        vkbd.inc
  29. ;        vlpt.inc
  30. ;        vdma.inc
  31. ;
  32. ;    By default, ALL portions of ALL include files are included (ie,
  33. ;    INCL_ALL is assumed).
  34. ;
  35. ;    To control what is included, use INCL_NONE and then select from
  36. ;    the following:
  37. ;
  38. ;        INCL_DEF
  39. ;        INCL_MI        BUGBUG 22-Feb-89 JeffPar:  NOT included by default
  40. ;        INCL_TYPES
  41. ;        INCL_MVDMTYPES
  42. ;        INCL_SSTODS
  43. ;        INCL_ROMBIOS
  44. ;        INCL_PAGE
  45. ;        INCL_VDH
  46. ;        INCL_VDHVPIC
  47. ;        INCL_VDHALL
  48. ;        INCL_VDDHELPERS
  49. ;        INCL_VDHVKBD
  50. ;        INCL_VDHVLPT
  51. ;        INCL_VDHVDMA
  52. ;
  53. ;
  54. ;    MODIFICATION HISTORY
  55. ;    10/11/88    JTP        Created.
  56. ;    12/02/88    SB        Deleted VDMINFO include.
  57. ;    12/04/88    JTP        Moved MVDM-specific definitions to here.
  58. ;
  59.  
  60.  
  61. ifndef INCL_NONE
  62. INCL_DEF    EQU 1
  63. INCL_TYPES    EQU 1
  64. INCL_MVDMTYPES    EQU 1
  65. INCL_SSTODS    EQU 1
  66. INCL_ROMBIOS    EQU 1
  67. INCL_PAGE    EQU 1
  68. INCL_VDHALL    EQU 1
  69. INCL_VDDHELPERS        EQU 1
  70. INCL_VDHVKBD    EQU 1
  71. INCL_VDHVLPT    EQU 1
  72. INCL_VDHVDMA    EQU 1
  73. endif
  74.  
  75. ifdef  INCL_VDHALL           ;if all VDH services, set defines
  76. INCL_VDH    EQU 1
  77. INCL_VDHVPIC    EQU 1
  78. INCL_VDHVKBD    EQU 1
  79. INCL_VDHVLPT    EQU 1
  80. INCL_VDHVDMA    EQU 1
  81. endif
  82.  
  83. ifdef  INCL_VDH               ;VDH services require MVDM types
  84. INCL_MVDMTYPES    EQU 1
  85. endif
  86.  
  87. ifdef  INCL_VDHVPIC           ;VDH services require MVDM types
  88. INCL_MVDMTYPES    EQU 1
  89. endif
  90.  
  91. ifdef  INCL_VDHVKBD           ;VDH services require MVDM types
  92. INCL_MVDMTYPES    EQU 1
  93. endif
  94.  
  95. ifdef  INCL_VDHVLPT           ;VDH services require MVDM types
  96. INCL_MVDMTYPES    EQU 1
  97. endif
  98.  
  99. ifdef  INCL_VDHVDMA           ;VDH services require MVDM types
  100. INCL_MVDMTYPES    EQU 1
  101. endif
  102.  
  103. ifdef  INCL_MVDMTYPES           ;MVDM types depend on basic types
  104. INCL_TYPES    EQU 1
  105. endif
  106.  
  107. ifdef  INCL_TYPES           ;types depend on basemaca.inc macros
  108. INCL_DEF    EQU 1
  109. endif
  110.  
  111.  
  112. ;*** Required generic include files
  113. ;
  114.  
  115. include basemaca.inc          ;macros for MASM
  116.  
  117.     include    basedef.inc        ;basic OS/2 data types
  118.  
  119.  
  120. ;*** MVDM-specific equates (required for function prototypes)
  121. ;
  122.  
  123. DefEntry VDHENTRY PASCAL NEAR     ;to declare exported VDH services
  124. DefEntry HOOKENTRY PASCAL NEAR     ;to declare "hook" entry points
  125. DefEntry PDDENTRY PASCAL FAR32     ;to declare PDD and VDD entry points
  126. DefEntry VDDENTRY PASCAL FAR32 _loadds
  127.  
  128. VDDInit        EQU    <main>        ;kludge to force compiler to ref. __acrtused
  129.  
  130.  
  131. ;*** MVDM-specific macros
  132. ;
  133.  
  134.  
  135.  
  136. ifdef  INCL_VDDHELPERS
  137.  
  138. PRIVENTRY vdhSaveFlags        <VOID>       ;prototypes for helper externals
  139. PRIVENTRY vdhRestoreFlags        <ULONG>
  140. PRIVENTRY vdhInt3        <VOID>
  141. PRIVENTRY vdhXCHG        <PULONG, ULONG>
  142. PRIVENTRY vdhBTC        <PULONG, ULONG>
  143. PRIVENTRY vdhBTR        <PULONG, ULONG>
  144. PRIVENTRY vdhBTS        <PULONG, ULONG>
  145. PRIVENTRY vdhBSF        <ULONG>
  146. PRIVENTRY vdhBSR        <ULONG>
  147. PRIVENTRY vdhOutSB        <PORT, PBYTE, ULONG, BOOL>
  148. PRIVENTRY vdhFindToken        <PSZ>
  149. PRIVENTRY vdhCompareStr        <PSZ, PSZ, BOOL>
  150. PRIVENTRY vdhMoveMem        <PVOID, PVOID, _INT, _INT, UINT, BOOL>
  151.  
  152.  
  153. DISABLE macro            ;alias for CLI (similar to C)
  154.     cli
  155.     endm
  156.  
  157. ENABLE    macro            ;alias for STI (similar to C)
  158.     sti
  159.     endm
  160.  
  161. PUSHFLAGS macro            ;alias for PUSHF
  162.     pushf
  163.     endm
  164.  
  165. POPFLAGS macro            ;alias for POPF
  166.     popf
  167.     endm
  168.  
  169. INT3    macro            ;alias for _INT 3
  170.     int 3
  171.     endm
  172.  
  173. INB    macro    ral,rdx        ;alias for IN AL,DX (also supports IN AH,DX)
  174.     ifidni    <ral>,<ah>
  175.       xchg      al,ah
  176.       in      al,rdx
  177.       xchg      al,ah
  178.     else
  179.       in      ral,rdx
  180.     endif
  181.     endm
  182.  
  183. INW    macro    rax,rdx        ;alias for IN AX,DX (provides support for IO8BIT)
  184.     IFNDEF IO8BIT
  185.     in    rax,rdx
  186.     ELSE
  187.     in    al,rdx
  188.     xchg    al,ah
  189.     inc    rdx
  190.     jmp    $+2
  191.     in    al,rdx
  192.     xchg    al,ah
  193.     dec    rdx
  194.     ENDIF
  195.     endm
  196.  
  197. OUTB    macro    rdx,ral        ;alias for OUT DX,AL (also supports OUT DX,AH)
  198.     ifidni    <ral>,<ah>
  199.       xchg      al,ah
  200.       out      rdx,al
  201.       xchg      al,ah
  202.     else
  203.       out      rdx,ral
  204.     endif
  205.     endm
  206.  
  207. OUTW    macro    rdx,rax        ;alias for OUT DX,AX (provides support for IO8BIT)
  208.     IFNDEF IO8BIT
  209.     out    rdx,rax
  210.     ELSE
  211.     out    rdx,al
  212.     xchg    al,ah
  213.     inc    rdx
  214.     jmp    $+2
  215.     out    rdx,al
  216.     xchg    al,ah
  217.     dec    rdx
  218.     ENDIF
  219.     endm
  220.  
  221. endif  ;INCL_VDDHELPERS
  222.  
  223.  
  224. ;*** MVDM-specific types
  225. ;
  226.  
  227. ifdef  INCL_MVDMTYPES
  228.  
  229. DefType PVDM,PVOID            ;linear pointer into VDM      ;pvdm
  230.  
  231. DefType PBVDM,PBYTE            ;same as PVDM, but often needs less casting
  232.  
  233. DefType VBREG,_BYTE            ;virtual byte register          ;vb
  234.  
  235. endif  ;INCL_MVDMTYPES
  236.  
  237.  
  238. ;*** MVDM-specific include files
  239. ;
  240.  
  241. ifdef  INCL_VDH
  242.     include    vdmprop.inc        ;DOS property services
  243.     include    vdmm.inc        ;VDM Manager services
  244.     include    v8086.inc        ;8086 emulation services
  245.     include    vdos.inc        ;DOS emulation services
  246.     include    vbios.inc        ;BIOS emulation services        ;j-ea1006
  247. endif
  248.  
  249. ifdef  INCL_VDHVPIC
  250.     include    vpic.inc        ;VPIC services
  251. endif
  252.  
  253. ifdef  INCL_VDHVKBD
  254.     include    vkbd.inc        ;VKBD services
  255. endif
  256.  
  257. ifdef  INCL_VDHVLPT
  258.     include    vlpt.inc        ;VLPT services
  259. endif
  260.  
  261. ifdef  INCL_VDHVDMA
  262.     include    vdma.inc        ;VDMA services
  263. endif
  264.  
  265. ifdef  INCL_ROMBIOS           ;ROM BIOS Data Area definitions
  266.     include    vdmbios.inc
  267.     include    vdmbiosj.inc        ;J-YF001
  268. endif
  269.  
  270. ifdef  INCL_MI               ;machine instructions
  271. DefType _t,db            ;BUGBUG 22-Feb-89 JeffPar:
  272. DefType _t,dw             MI.INC needs to be fixed!!!
  273. DefType _t,dd
  274.  
  275.     include    mi.inc
  276. endif
  277.