#define	frame	((char *) 0XD00000L)
#define	_enable	((char *) 0XD20000L)
#define	_colour	((char *) 0XD20001L)
#define	_origin	((short *) 0XD20002L)
#define colourmap ((short *) 0XD30000L)
struct _mickey {short x, y; char :5, b:3};
#define	mouse	((struct _mickey *) 0X7FFF0)

#define	XPIXELS	688
#define	YPIXELS	512

#define	BLACK	256
#define	RED	1
#define	GREEN	2
#define	YELLOW	3
#define	BLUE	4
#define	MAGENTA	5
#define	CYAN	6
#define	WHITE	7
#define	COMP	010
#define	ALL	017

#define	colour(c)	(*_colour=(c))
#define	offset(x,y)	(*_origin=(((x)>>4)&63)+(((y)-1+YPIXELS)<<6))
#define	enable(c)	(*_enable=(c))
#define	plot(x,y) (((int *)frame)[(((y)&1023)<<5)+(((x)&1023)>>5)]\
 = 1<<(31-((x)&31)))

#define	setpos(x, y)	(_g_x = (x), _g_y = (y))
#define	setfont(f)	(_g_font = f)
#define FONTSIZE	5000

extern int _g_x, _g_y;
extern unsigned short *_g_font;

void line(), trapeze(), triangle(), fill(), clear(), resetcol(), resetmap();
int readfont();
char gputc();
