;*DDK*************************************************************************/
;
; COPYRIGHT    Copyright (C) 1995 IBM Corporation
;
;    The following IBM OS/2 WARP source code is provided to you solely for
;    the purpose of assisting you in your development of OS/2 WARP device
;    drivers. You may use this code in accordance with the IBM License
;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
;    Copyright statement may not be removed.;
;*****************************************************************************/
BSEDEV_INCLUDED	EQU	1

IOCTL_ASYNC	EQU	0001H 
IOCTL_SCR_AND_PTRDRAW	EQU	0003H 
IOCTL_KEYBOARD	EQU	0004H 
IOCTL_PRINTER	EQU	0005H 
IOCTL_LIGHTPEN	EQU	0006H 
IOCTL_POINTINGDEVICE	EQU	0007H 
IOCTL_DISK	EQU	0008H 
IOCTL_PHYSICALDISK	EQU	0009H 
IOCTL_MONITOR	EQU	000AH 
IOCTL_GENERAL	EQU	000BH 
ASYNC_SETBAUDRATE	EQU	0041H 
ASYNC_SETLINECTRL	EQU	0042H 
ASYNC_TRANSMITIMM	EQU	0044H 
ASYNC_SETBREAKOFF	EQU	0045H 
ASYNC_SETMODEMCTRL	EQU	0046H 
ASYNC_SETBREAKON	EQU	004BH 
ASYNC_STOPTRANSMIT	EQU	0047H 
ASYNC_STARTTRANSMIT	EQU	0048H 
ASYNC_SETDCBINFO	EQU	0053H 
ASYNC_GETBAUDRATE	EQU	0061H 
ASYNC_GETLINECTRL	EQU	0062H 
ASYNC_GETCOMMSTATUS	EQU	0064H 
ASYNC_GETLINESTATUS	EQU	0065H 
ASYNC_GETMODEMOUTPUT	EQU	0066H 
ASYNC_GETMODEMINPUT	EQU	0067H 
ASYNC_GETINQUECOUNT	EQU	0068H 
ASYNC_GETOUTQUECOUNT	EQU	0069H 
ASYNC_GETCOMMERROR	EQU	006DH 
ASYNC_GETCOMMEVENT	EQU	0072H 
ASYNC_GETDCBINFO	EQU	0073H 
SCR_ALLOCLDT	EQU	0070H 
SCR_DEALLOCLDT	EQU	0071H 
PTR_GETPTRDRAWADDRESS	EQU	0072H 
SCR_ALLOCLDTOFF	EQU	0075H 
KBD_SETTRANSTABLE	EQU	0050H 
KBD_SETINPUTMODE	EQU	0051H 
KBD_SETINTERIMFLAG	EQU	0052H 
KBD_SETSHIFTSTATE	EQU	0053H 
KBD_SETTYPAMATICRATE	EQU	0054H 
KBD_SETFGNDSCREENGRP	EQU	0055H 
KBD_SETSESMGRHOTKEY	EQU	0056H 
KBD_SETFOCUS	EQU	0057H 
KBD_SETKCB	EQU	0058H 
KBD_SETNLS	EQU	005CH 
KBD_CREATE	EQU	005DH 
KBD_DESTROY	EQU	005EH 
KBD_GETINPUTMODE	EQU	0071H 
KBD_GETINTERIMFLAG	EQU	0072H 
KBD_GETSHIFTSTATE	EQU	0073H 
KBD_READCHAR	EQU	0074H 
KBD_PEEKCHAR	EQU	0075H 
KBD_GETSESMGRHOTKEY	EQU	0076H 
KBD_GETKEYBDTYPE	EQU	0077H 
KBD_GETCODEPAGEID	EQU	0078H 
KBD_XLATESCAN	EQU	0079H 
PRT_QUERYJOBHANDLE	EQU	0021H 
PRT_SETFRAMECTL	EQU	0042H 
PRT_SETINFINITERETRY	EQU	0044H 
PRT_INITPRINTER	EQU	0046H 
PRT_ACTIVATEFONT	EQU	0048H 
PRT_GETFRAMECTL	EQU	0062H 
PRT_GETINFINITERETRY	EQU	0064H 
PRT_GETPRINTERSTATUS	EQU	0066H 
PRT_QUERYACTIVEFONT	EQU	0069H 
PRT_VERIFYFONT	EQU	006AH 
MOU_ALLOWPTRDRAW	EQU	0050H 
MOU_UPDATEDISPLAYMODE	EQU	0051H 
MOU_SCREENSWITCH	EQU	0052H 
MOU_SETSCALEFACTORS	EQU	0053H 
MOU_SETEVENTMASK	EQU	0054H 
MOU_SETHOTKEYBUTTON	EQU	0055H 
MOU_SETPTRSHAPE	EQU	0056H 
MOU_DRAWPTR	EQU	0057H 
MOU_REMOVEPTR	EQU	0058H 
MOU_SETPTRPOS	EQU	0059H 
MOU_SETPROTDRAWADDRESS	EQU	005AH 
MOU_SETREALDRAWADDRESS	EQU	005BH 
MOU_SETMOUSTATUS	EQU	005CH 
MOU_DISPLAYMODECHANGE	EQU	005DH 
MOU_GETBUTTONCOUNT	EQU	0060H 
MOU_GETMICKEYCOUNT	EQU	0061H 
MOU_GETMOUSTATUS	EQU	0062H 
MOU_READEVENTQUE	EQU	0063H 
MOU_GETQUESTATUS	EQU	0064H 
MOU_GETEVENTMASK	EQU	0065H 
MOU_GETSCALEFACTORS	EQU	0066H 
MOU_GETPTRPOS	EQU	0067H 
MOU_GETPTRSHAPE	EQU	0068H 
MOU_GETHOTKEYBUTTON	EQU	0069H 
MOU_VER	EQU	006AH 
DSK_LOCKDRIVE	EQU	0000H 
DSK_UNLOCKDRIVE	EQU	0001H 
DSK_REDETERMINEMEDIA	EQU	0002H 
DSK_SETLOGICALMAP	EQU	0003H 
DSK_BLOCKREMOVABLE	EQU	0020H 
DSK_GETLOGICALMAP	EQU	0021H 
DSK_SETDEVICEPARAMS	EQU	0043H 
DSK_WRITETRACK	EQU	0044H 
DSK_FORMATVERIFY	EQU	0045H 
DSK_GETDEVICEPARAMS	EQU	0063H 
DSK_READTRACK	EQU	0064H 
DSK_VERIFYTRACK	EQU	0065H 
PDSK_LOCKPHYSDRIVE	EQU	0000H 
PDSK_UNLOCKPHYSDRIVE	EQU	0001H 
PDSK_WRITEPHYSTRACK	EQU	0044H 
PDSK_GETPHYSDEVICEPARAMS	EQU	0063H 
PDSK_READPHYSTRACK	EQU	0064H 
PDSK_VERIFYPHYSTRACK	EQU	0065H 
MON_REGISTERMONITOR	EQU	0040H 
DEV_FLUSHINPUT	EQU	0001H 
DEV_FLUSHOUTPUT	EQU	0002H 
DEV_QUERYMONSUPPORT	EQU	0060H 
RX_QUE_OVERRUN	EQU	0001H 
RX_HARDWARE_OVERRUN	EQU	0002H 
PARITY_ERROR	EQU	0004H 
FRAMING_ERROR	EQU	0008H 
CHAR_RECEIVED	EQU	0001H 
LAST_CHAR_SENT	EQU	0004H 
CTS_CHANGED	EQU	0008H 
DSR_CHANGED	EQU	0010H 
DCD_CHANGED	EQU	0020H 
BREAK_DETECTED	EQU	0040H 
ERROR_OCCURRED	EQU	0080H 
RI_DETECTED	EQU	0100H 
TX_WAITING_FOR_CTS	EQU	0001H 
TX_WAITING_FOR_DSR	EQU	0002H 
TX_WAITING_FOR_DCD	EQU	0004H 
TX_WAITING_FOR_XON	EQU	0008H 
TX_WAITING_TO_SEND_XON	EQU	0010H 
TX_WAITING_WHILE_BREAK_ON	EQU	0020H 
TX_WAITING_TO_SEND_IMM	EQU	0040H 
RX_WAITING_FOR_DSR	EQU	0080H 
WRITE_REQUEST_QUEUED	EQU	0001H 
DATA_IN_TX_QUE	EQU	0002H 
HARDWARE_TRANSMITTING	EQU	0004H 
CHAR_READY_TO_SEND_IMM	EQU	0008H 
WAITING_TO_SEND_XON	EQU	0010H 
WAITING_TO_SEND_XOFF	EQU	0020H 
CTS_ON	EQU	10H 
DSR_ON	EQU	20H 
RI_ON	EQU	40H 
DCD_ON	EQU	80H 
BUILD_BPB_FROM_MEDIUM	EQU	00H 
REPLACE_BPB_FOR_DEVICE	EQU	01H 
REPLACE_BPB_FOR_MEDIUM	EQU	02H 
GET_BPB_FROM_DEVICE	EQU	00H 
GET_BPB_FROM_MEDIUM	EQU	01H 
ASCII_MODE	EQU	00H 
BINARY_MODE	EQU	80H 
CONVERSION_REQUEST	EQU	20H 
INTERIM_CHAR	EQU	80H 
HOTKEY_MAX_COUNT	EQU	0000H 
HOTKEY_CURRENT_COUNT	EQU	0001H 
KBD_DATA_RECEIVED	EQU	0001H 
KBD_DATA_BINARY	EQU	8000H 
KBD_READ_WAIT	EQU	0000H 
KBD_READ_NOWAIT	EQU	8000H 
SHIFT_REPORT_MODE	EQU	01H 
ifndef INCL_MOU
MOUSE_MOTION	EQU	0001H 
MOUSE_MOTION_WITH_BN1_DOWN	EQU	0002H 
MOUSE_BN1_DOWN	EQU	0004H 
MOUSE_MOTION_WITH_BN2_DOWN	EQU	0008H 
MOUSE_BN2_DOWN	EQU	0010H 
MOUSE_MOTION_WITH_BN3_DOWN	EQU	0020H 
MOUSE_BN3_DOWN	EQU	0040H 
MHK_BUTTON1	EQU	0001H 
MHK_BUTTON2	EQU	0002H 
MHK_BUTTON3	EQU	0004H 
MOU_NOWAIT	EQU	0000H 
MOU_WAIT	EQU	0001H 
endif 
MHK_NO_HOTKEY	EQU	0000H 
MOUSE_QUEUEBUSY	EQU	0001H 
MOUSE_BLOCKREAD	EQU	0002H 
MOUSE_FLUSH	EQU	0004H 
MOUSE_UNSUPPORTED_MODE	EQU	0008H 
MOUSE_DISABLED	EQU	0100H 
MOUSE_MICKEYS	EQU	0200H 
PRINTER_TIMEOUT	EQU	0001H 
PRINTER_IO_ERROR	EQU	0008H 
PRINTER_SELECTED	EQU	0010H 
PRINTER_OUT_OF_PAPER	EQU	0020H 
PRINTER_ACKNOWLEDGED	EQU	0040H 
PRINTER_NOT_BUSY	EQU	0080H 
MODE_DTR_CONTROL	EQU	01H 
MODE_DTR_HANDSHAKE	EQU	02H 
MODE_CTS_HANDSHAKE	EQU	08H 
MODE_DSR_HANDSHAKE	EQU	10H 
MODE_DCD_HANDSHAKE	EQU	20H 
MODE_DSR_SENSITIVITY	EQU	40H 
MODE_AUTO_TRANSMIT	EQU	01H 
MODE_AUTO_RECEIVE	EQU	02H 
MODE_ERROR_CHAR	EQU	04H 
MODE_NULL_STRIPPING	EQU	08H 
MODE_BREAK_CHAR	EQU	10H 
MODE_RTS_CONTROL	EQU	40H 
MODE_RTS_HANDSHAKE	EQU	80H 
MODE_TRANSMIT_TOGGLE	EQU	0C0H 
MODE_NO_WRITE_TIMEOUT	EQU	01H 
MODE_READ_TIMEOUT	EQU	02H 
MODE_WAIT_READ_TIMEOUT	EQU	04H 
MODE_NOWAIT_READ_TIMEOUT	EQU	06H 

DCBINFO	STRUC
dcbinf_usWriteTimeout	DW	?
dcbinf_usReadTimeout	DW	?
dcbinf_fbCtlHndShake	DB	?
dcbinf_fbFlowReplace	DB	?
dcbinf_fbTimeout	DB	?
dcbinf_bErrorReplacementChar	DB	?
dcbinf_bBreakReplacementChar	DB	?
dcbinf_bXONChar	DB	?
dcbinf_bXOFFChar	DB	?
DCBINFO	ENDS

TRACKLAYOUT	STRUC
trckl_bCommand	DB	?
trckl_usHead	DW	?
trckl_usCylinder	DW	?
trckl_usFirstSector	DW	?
trckl_cSectors	DW	?
trckl_usSectorNumber	DW	?
trckl_usSectorSize	DW	?
TRACKLAYOUT	ENDS
DEVTYPE_48TPI	EQU	0000H 
DEVTYPE_96TPI	EQU	0001H 
DEVTYPE_35	EQU	0002H 
DEVTYPE_8SD	EQU	0003H 
DEVTYPE_8DD	EQU	0004H 
DEVTYPE_FIXED	EQU	0005H 
DEVTYPE_TAPE	EQU	0006H 
DEVTYPE_UNKNOWN	EQU	0007H 

BIOSPARAMETERBLOCK	STRUC
bspblk_usBytesPerSector	DW	?
bspblk_bSectorsPerCluster	DB	?
bspblk_usReservedSectors	DW	?
bspblk_cFATs	DB	?
bspblk_cRootEntries	DW	?
bspblk_cSectors	DW	?
bspblk_bMedia	DB	?
bspblk_usSectorsPerFAT	DW	?
bspblk_usSectorsPerTrack	DW	?
bspblk_cHeads	DW	?
bspblk_cHiddenSectors	DD	?
bspblk_cLargeSectors	DD	?
bspblk_abReserved	DB	6 DUP (?)
bspblk_cCylinders	DW	?
bspblk_bDeviceType	DB	?
bspblk_fsDeviceAttr	DW	?
BIOSPARAMETERBLOCK	ENDS

SCREENGROUP	STRUC
scrgrp_idScreenGrp	DW	?
scrgrp_fTerminate	DW	?
SCREENGROUP	ENDS

FRAME	STRUC
frm_bCharsPerLine	DB	?
frm_bLinesPerInch	DB	?
FRAME	ENDS

KBDTYPE	STRUC
kbdtyp_usType	DW	?
kbdtyp_reserved1	DW	?
kbdtyp_reserved2	DW	?
KBDTYPE	ENDS

LINECONTROL	STRUC
lnctl_bDataBits	DB	?
lnctl_bParity	DB	?
lnctl_bStopBits	DB	?
lnctl_fTransBreak	DB	?
LINECONTROL	ENDS
DTR_ON	EQU	01H 
RTS_ON	EQU	02H 
DTR_OFF	EQU	0FEH 
RTS_OFF	EQU	0FDH 

MODEMSTATUS	STRUC
mdmst_fbModemOn	DB	?
mdmst_fbModemOff	DB	?
MODEMSTATUS	ENDS

TRACKFORMAT	STRUC
trckfmt_bCommand	DB	?
trckfmt_usHead	DW	?
trckfmt_usCylinder	DW	?
trckfmt_usReserved	DW	?
trckfmt_cSectors	DW	?
trckfmt_bCylinder	DB	?
trckfmt_bHead	DB	?
trckfmt_idSector	DB	?
trckfmt_bBytesSector	DB	?
TRACKFORMAT	ENDS

RXQUEUE	STRUC
rxq_cch	DW	?
rxq_cb	DW	?
RXQUEUE	ENDS

DEVICEPARAMETERBLOCK	STRUC
dvpblck_reserved1	DW	?
dvpblck_cCylinders	DW	?
dvpblck_cHeads	DW	?
dvpblck_cSectorsPerTrack	DW	?
dvpblck_reserved2	DW	?
dvpblck_reserved3	DW	?
dvpblck_reserved4	DW	?
dvpblck_reserved5	DW	?
DEVICEPARAMETERBLOCK	ENDS

PTRDRAWFUNCTION	STRUC
ptrdfnc_usReturnCode	DW	?
ptrdfnc_pfnDraw	DD	?
ptrdfnc_pchDataSeg	DD	?
PTRDRAWFUNCTION	ENDS

PTRDRAWADDRESS	STRUC
ptrdaddr_reserved	DW	?
ptrdaddr_ptrdfnc	DB	SIZE PTRDRAWFUNCTION DUP (?)
PTRDRAWADDRESS	ENDS

SHIFTSTATE	STRUC
shftst_fsState	DW	?
shftst_fNLS	DB	?
SHIFTSTATE	ENDS
RIGHTSHIFT	EQU	0001H 
LEFTSHIFT	EQU	0002H 
CONTROL	EQU	0004H 
ALT	EQU	0008H 
SCROLLLOCK_ON	EQU	0010H 
NUMLOCK_ON	EQU	0020H 
CAPSLOCK_ON	EQU	0040H 
INSERT_ON	EQU	0080H 
LEFTCONTROL	EQU	0100H 
LEFTALT	EQU	0200H 
RIGHTCONTROL	EQU	0400H 
RIGHTALT	EQU	0800H 
SCROLLLOCK	EQU	1000H 
NUMLOCK	EQU	2000H 
CAPSLOCK	EQU	4000H 
SYSREQ	EQU	8000H 

HOTKEY	STRUC
htky_fsHotKey	DW	?
htky_uchScancodeMake	DB	?
htky_uchScancodeBreak	DB	?
htky_idHotKey	DW	?
HOTKEY	ENDS

MONITORPOSITION	STRUC
mnpos_fPosition	DW	?
mnpos_index	DW	?
mnpos_pbInBuf	DD	?
mnpos_offOutBuf	DW	?
MONITORPOSITION	ENDS

RATEDELAY	STRUC
rtdly_usDelay	DW	?
rtdly_usRate	DW	?
RATEDELAY	ENDS

CODEPAGEINFO	STRUC
cpi_pbTransTable	DD	?
cpi_idCodePage	DW	?
cpi_idTable	DW	?
CODEPAGEINFO	ENDS

CPID	STRUC
cpid_idCodePage	DW	?
cpid_Reserved	DW	?
CPID	ENDS

LDTADDRINFO	STRUC
ldtaddr_pulPhysAddr	DD	?
ldtaddr_cb	DW	?
LDTADDRINFO	ENDS

PTRDRAWDATA	STRUC
ptrdd_cb	DW	?
ptrdd_usConfig	DW	?
ptrdd_usFlag	DW	?
PTRDRAWDATA	ENDS
