#include	<stdio.h>
#include	<dos.h>

struct CIRCLE {
	unsigned	type;
	int			cx,cy,cr;
};

extern	unsigned	char	gds_fshift;
extern	unsigned	gds_wrkoff;
extern	unsigned	gds_wrkseg;

int	g_circle(int x,int y,int r)
{
	union REGS	reg;
	struct SREGS	seg;
	struct {
		unsigned	len;
		struct CIRCLE	crcl;
	}	gdata;

	segread(&seg);
	reg.h.ah=gds_fshift+0x0f;
	reg.x.di=(unsigned)&gdata;
	seg.ds=seg.ss;
	gdata.len=8;
	gdata.crcl.type=0x4186;
	gdata.crcl.cx=x;
	gdata.crcl.cy=y;
	gdata.crcl.cr=r;
	reg.x.bx=gds_wrkoff;
	seg.es=gds_wrkseg;
	int86x(0x92,&reg,&reg,&seg);
	return (int)reg.h.ah;
}
