;       SCCSID = @(#)kbdfapi.inc	6.1 91/02/15
;	SCCSID = @(#)kbdfapi.inc	6.2 90/01/22
; ****************************************************************************
; *									     *
; *			  IBM/Microsoft Confidential			     *
; *									     *
; *		    Copyright (c) IBM Corporation  1987, 1990		     *
; *		    Copyright (c) Microsoft Corp.  1987, 1990		     *
; *			      All Rights Reserved			     *
; *									     *
; ****************************************************************************
	Page	60,132
;
;	Modification History
;
;	12-Aug-86 (billme): add constants RAW_NOECHO and COOKED_ECHO
;	23-Aug-86 (billme): add constants KBD_BUF_SIZE and KBD_MAX_IN
;	for call to int 21h, fcn 0ah from kbdstringin

;
; Family API include file
;
KBD_MAX_IN	EQU	255			; kbdstringin max allowed input
KBD_BUF_SIZE	EQU	257			; size of input buffer

RAW_NOECHO	EQU	00000110B
COOKED_ECHO	EQU	00001001B

RAWCOOKED	EQU	00001100B
ECHOONOFF	EQU	00000011B
ECHOON		EQU	00000001B
TURNAROUNDCHAR	EQU	0DH			; TurnAround character

MAXBUFSIZE	EQU	255			; max size of internal buffer
NOWAITIO	EQU	1			; used to check input
WAITIO		EQU	0
RAW		EQU	4			; used to check internal flag
COOKED		EQU	8
CHAR_PENDING	EQU	0FFH			; character available
NONE		EQU	0			; character not available
NULL		EQU	0			; Null
CHAR_AVAIL	EQU	40H			;
BIOS_SEGMENT	EQU	40H			; BIOS data segment
KBDFLAG		EQU	17H			; Keyboard flag offset
BUFFER_LEN	EQU	10			; Buffer length for Get/Set
						;   Status

; cpd12 (p1082) added enhanced keyboard support for F11 and F12 keys
KB_FLAG_3	EQU     96H			; Keyboard mode state offset
KBX		EQU	10H			; Enhanced keyboard installed


CharData	STRUC				; data record template

	Char		db	?		; ascii character
	Scan		db	?		; scan code
	Status		db	?		; status word
	NLS_Shift	db	?		; NLS shift status
	Shifts		dw	?		; shift state
	Hours		db	?		; time stamp
	Minutes		db	?
	Seconds		db	?
	Tenths		db	?

CharData	ENDS


KbdStatus	STRUC				; get/set status template

	KbdStatLength	dw	?		; structure length (byte value)
	KbdStatMask	dw	?		; input mask
	TA_Char		dw	?		; turnaround character
	Interim_Char	db	?		; interim character
	NLS_Shift_State db	?		; NLS shift status
	Shift_State	dw	?		; keyboard shift status

KbdStatus	ENDS
