Source code of Windows XP (NT5)
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.

95 lines
3.7 KiB

  1. /*++ BUILD Version: 0002
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WOWCOMM.H
  8. * Constants, macros, etc common to WOW16/WOW32
  9. *
  10. * History:
  11. * Created 28-Apr-1993 by Craig Jones (v-cjones)
  12. *
  13. --*/
  14. #ifndef __WOWCOMM__ // has this been included before?
  15. #define __WOWCOMM__
  16. #ifndef UNALIGNED // this makes UNALIGNED visible only to 32-bit stuff
  17. #define UNALIGNED // and invisible to 16-bit stuff
  18. #endif
  19. /* XLATOFF */
  20. #pragma pack(1)
  21. /* XLATON */
  22. // COMDEB - Communications Device Equipment Block. (copied from ibmcom.inc)
  23. //
  24. // This is essentially a superset of the DCB used outside of this
  25. // module. The DCB is contained within the DEB as the first fields.
  26. // The fields which follow are data and status fields which
  27. // are unique to this implementation.
  28. //
  29. // AltQInAddr and AltQOutAddr are alternate queue pointers which are used when
  30. // in "supervisor" mode. Supervisor mode is a processor mode other than the
  31. // one which Windows normally runs in. In standard mode Windows, supervisor
  32. // mode is REAL mode. In enhanced mode Windows, supervisor mode is RING 0
  33. // protected mode. For more details see comments in IBMINT.ASM.
  34. // RS232 Data Equip Block
  35. typedef struct _COMDEB16 { /* cdeb16 */
  36. BYTE ComDCB; // size of this struct
  37. WORD ComErr; // Non-zero if I/O error
  38. WORD Port; // Base I/O Address
  39. WORD NotifyHandle;
  40. WORD NotifyFlags;
  41. WORD RecvTrigger; // char count threshold for calling
  42. WORD SendTrigger; // char count threshold for calling
  43. // The following fields are specific to com ports only
  44. WORD IRQhook; // ptr to IRQ_Hook_Struc
  45. WORD NextDEB; // ptr to next DEB that is sharing IRQ
  46. WORD XOffPoint; // Q count where XOff is sent
  47. WORD EvtMask; // Mask of events to check for
  48. WORD EvtWord; // Event flags
  49. DWORD QInAddr; // Address of the queue
  50. DWORD AltQInAddr; // Addr of queue in "supervisor" mode
  51. WORD QInSize; // Length of queue in bytes
  52. DWORD QOutAddr; // Address of the queue
  53. DWORD AltQOutAddr; // Addr of queue in "supervisor" mode
  54. WORD QOutSize; // Length of queue in bytes
  55. WORD QInCount; // Number of bytes currently in queue
  56. WORD QInGet; // Offset into queue to get bytes from
  57. WORD QInPut; // Offset into queue to put bytes in
  58. WORD QOutCount; // Number of bytes currently in queue
  59. WORD QOutGet; // Offset into queue to get bytes from
  60. WORD QOutPut; // Offset into queue to put bytes in
  61. BYTE EFlags; // Extended flags
  62. BYTE MSRShadow; // Modem Status Register Shadow
  63. BYTE ErrorMask; // Default error-checking mask
  64. BYTE RxMask; // Character mask
  65. BYTE ImmedChar; // Char to be transmitted immediately
  66. BYTE HSFlag; // Handshake flag
  67. BYTE HHSLines; // 8250 DTR/RTS bits for handshaking
  68. BYTE OutHHSLines; // Lines that must be high to output
  69. BYTE MSRMask; // Mask of Modem Lines to check
  70. BYTE MSRInfinite; // Mask of MSR lines that must be high
  71. BYTE IntVecNum; // Interrupt vector number
  72. BYTE LSRShadow; // Line Status Register shadow
  73. WORD QOutMod; // Characters sent mod xOnLim ENQ/ETX [rkh]
  74. DWORD VCD_data;
  75. BYTE VCDflags;
  76. BYTE MiscFlags; // still more flags
  77. } COMDEB16;
  78. typedef COMDEB16 UNALIGNED *PCOMDEB16;
  79. // In 3.0 MSRShadow had this relationship to EvtWord and major COM apps all
  80. // use this offset of 35 to get to MSRShadow so that they can determine the
  81. // current status of the Modem Status bits. We need to maintain this offset
  82. // so that these apps will continue to run.
  83. /* XLATOFF */
  84. #pragma pack()
  85. /* XLATON */
  86. #endif // __WOWCOMM__