/* DIVIDE_START=mylib.h */
/*
	mylib.h
*/

#include	<stdio.h>

struct WORDREGS {
	unsigned short	int	ax, bx, cx, dx, si, di, cflag, flags;
};

struct BYTEREGS {
	unsigned char	al, ah, bl, bh, cl, ch, dl, dh;
};

union	REGS	{
	struct	WORDREGS x;
	struct	BYTEREGS h;
};

struct	SREGS	{
	unsigned short	int	es;
	unsigned short	int	cs;
	unsigned short	int	ss;
	unsigned short	int	ds;
};

#define	TRUE	-1
#define	FALSE	0

#define	YES		TRUE
#define	NO		FALSE

#define	PAI		3.141592653589793238	/* 円周率 */
#define	DGRD	PAI/180.0			/* 度数を弧度法に変換 */
#define	pai		PAI

extern	void	color( int col );

#define	BLACK		0	/* 黒 */
#define	BLUE		1	/* 青 */
#define	RED			2	/* 赤 */
#define	VIOLET		3	/* 紫 */
#define	GREEN		4	/* 緑 */
#define	LIGHTBLUE	5	/* 水色 */
#define	YELLOW		6	/* 黄 */
#define	WHITE		7	/* 白 */

#define	forever	for ( ; ; )

#define	CURSOL_RIGHT	0x1c	/* カ−ソル右 */
#define	CURSOL_LEFT 	0x1d	/* カ−ソル左 */
#define	CURSOL_UP   	0x1e	/* カ−ソル上 */
#define	CURSOL_DOWN 	0x1f	/* カ−ソル下 */

#define	TORIKESI	0x11	/* 取消キー */
#define	JIKKOU		0x12	/* 実行キー */
#define	GIKKOU		JIKKOU

#define	L_KAKKO		'('
#define	R_KAKKO		')'
#define	TASU		'+'
#define	HIKU		'-'
#define	KAKE		'*'
#define	WARI		'/'
#define	WA			'='

#define	BUNBO		WA

/* プリンタ・コントロール・コード */
#define	TAB	0x09		/* tab */
#define	CLS	0x0c		/* clear screen */
#define	FF	0x0c		/* form fied */
#define	ESC	0x1b		/* escape */
#define	FS	0x1c		/* 漢字escape */
#define	CR	0x0d		/* 印字 */
#define	LF	0x0a		/* 改行 */
#define	SO	0x0e
#define	SI	0x0f
#define	DC1	0x11
#define	DC2	0x12
#define	DC3	0x13
#define	DC4	0x14

/* DIVIDE_END */
