/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:consdefs.h 12.0$ */
/* $ACIS:consdefs.h 12.0$ */
/* $Source: /ibm/acis/usr/sys/cacons/RCS/consdefs.h,v $ */

#if !defined(lint) && !defined(LOCORE)  && defined(RCS_HDRS)
static char *rcsidconsdefs = "$Header:consdefs.h 12.0$";
#endif

#ifndef DEBUGF
#include "../machine/debug.h"
#endif


#define min(x,y) x < y ? x : y
#define max(x,y) x > y ? x : y

#define in(port) IN(port)
#define out(port,value) OUT(port,value)
#define inw(port) INW(port)
#define outw(port,value) OUTW(port,value)

#define CRT_1 0x3b8		       /* crt port 1 */
#define PUT_SCR_REG(reg,value) out(0x3b4,reg); out(0x3b5,value);
#define PUT_SCR_REG_C(reg,value) out(0x3d4,reg); out(0x3d5,value); /* EGA */

#ifdef DEBUG
#define LOCAL			       /* make it external */
#else
#define LOCAL	static		       /* make it local */
#endif

extern int edebug;
#define EDEBUG(cond, stmt) DEBUGF((edebug & cond), stmt)

#if !defined(DEBOUNCE) && defined(IBMRTPC)
#define DEBOUNCE        1
#endif

#define CONS_SWITCH_FOCUS_CODE	0x5f

#ifdef DEBUG
#define TRACEF(x) if (cndebug) printf x			/* cndebugging stuff */
#else
#define TRACEF(x) 					/* cndebugging stuff */
#endif
