Newer
Older
Microsoft / screendoor / SYSTEM.H
@tundra tundra on 24 May 2012 2 KB Initial revision
/*   SYSTEM.H - Color, Video, And System Definitions For IBM-PC 
		Last Modified: 06/19/86
		Copyright (C) 1986, T.A. Daneliuk
*/


/*  Color Attribute Definitions


		General format for attribute byte is:


				b0-b2	Foreground Color
				b3		Low Intensity Bit
				b4-b6	Background Color
				b7		Blinking Bit

		Foreground and border can be any color.
		Background must be 0 to 7.

*/

#define		BLACK		0
#define		BLUE		1
#define		GREEN		2
#define		CYAN		3
#define		RED			4
#define		MAGENTA		5
#define		BROWN		6
#define		WHITE		7
#define		GRAY		8
#define		LBLUE		9
#define		LGREEN		10
#define		LCYAN		11
#define		LRED		12
#define		LMAGENTA	13
#define		YELLOW		14
#define		HWHITE		15
#define		NORMAL		7			/* White On Black Video      */
#define		REVERSE		0x70		/* Reverse Video             */
#define		BLINK		0x80		/* Blink attribute bit       */
#define		INTENSE		HWHITE		/* Emphasized White On Black */


/*  Terminal Definitions  */


#define		VWIDTH		80			/* Display width */
#define		VHEIGHT		25			/* Display height */


/*  Cursor And Attribute Macros  */


#define		color(fore,back)	((back<<4)|fore)	/* Make valid PC color attribute from colors */
#define		center(string)		(strlen(string)>=VWIDTH ? 0:(VWIDTH-strlen(string))/2)
#define		dsplylin(v,h,s,a)	{v_rowcol(v,h);scr_aputs(s,a);}
#define		fill_lin(v,h,c,l,a)	dsplylin(v,h,mkstr(c,l),a)
#define		cursorblk(x)		(x==TRUE ? cursorsz(0,7):cursorsz(6,7))


/*  Border Character Definitions  */


#define		BORDERV		0xBA
#define		BORDERH		0xCD
#define		BORDERNE	0xBB
#define		BORDERSE  	0xBC
#define		BORDERNW	0xC9
#define		BORDERSW	0xC8


/* Key Definitions */


#define		TAB			0x09
#define		TABBK		0x0F				/* Preceeded by 00 */
#define		INS			0x52				/* Preceeded by 00 */
#define		DEL			0x53				/* Preceeded by 00 */
#define		SPACE		0x20
#define		BKSPC		0x08
#define		ENTER		0x0D
#define		CLR_FLD		0x0A
#define		ESC			0x1B				/* Preceeded by 00 */
#define		UARROW		0x48				/* Preceeded by 00 */
#define		DARROW		0x50				/* Preceeded by 00 */
#define		RARROW		0x4D				/* Preceeded by 00 */
#define		LARROW		0x4B				/* Preceeded by 00 */
#define		HOME		0x47				/* Preceeded by 00 */
#define		END			0x4F				/* Preceeded by 00 */
#define		PGUP		0x49				/* Preceeded by 00 */
#define		PGDN		0x51				/* Preceeded by 00 */
#define		FN1			0x3B				/* Preceeded by 00 */
#define		FN2			0x3C				/* Preceeded by 00 */
#define		FN3			0x3D				/* Preceeded by 00 */
#define		FN4			0x3E				/* Preceeded by 00 */
#define		FN5			0x3F				/* Preceeded by 00 */
#define		FN6			0x40				/* Preceeded by 00 */
#define		FN7			0x41				/* Preceeded by 00 */
#define		FN8			0x42				/* Preceeded by 00 */
#define		FN9			0x43				/* Preceeded by 00 */
#define		FN10		0x44				/* Preceeded by 00 */
#define		HELP		FN1					/* Use function key 1 as Help */


/* Misc. System Dependent Parameters */

#define		MAXSTRING	199					/* Maximum string length (DeSmet) */


/*  END OF <SYSTEM.H> INSERT DECK */