#include	<stdio.h>
#include	<dos.h>

struct LINE {
	unsigned	type;
	int			lx1,ly1,lx2,ly2;
};

extern	unsigned	char	gds_fshift;
extern	unsigned	gds_wrkoff;
extern	unsigned	gds_wrkseg;

int	g_line(int x1,int y1,int x2,int y2)
{
	union REGS	reg;
	struct SREGS	seg;
	struct {
		unsigned	len;
		struct LINE	l;
	}	gdata;

	segread(&seg);
	reg.h.ah=gds_fshift+0x0f;
	reg.x.di=(unsigned)&gdata;
	seg.ds=seg.ss;
	gdata.len=10;
	gdata.l.type=0x4048;
	gdata.l.lx1=x1;
	gdata.l.ly1=y1;
	gdata.l.lx2=x2;
	gdata.l.ly2=y2;
	reg.x.bx=gds_wrkoff;
	seg.es=gds_wrkseg;
	int86x(0x92,&reg,&reg,&seg);
	return (int)reg.h.ah;
}
