readsect(fnum , ftrack , fsector , fhead , fdrive , fbuf )
int fnum , ftrack , fsector , fhead , fdrive;
char *fbuf;
{
  union REGS win,wout;
  struct SREGS wsegreg;

  segread(&wsegreg);		/* get register values	*/

  win.x.bx =  (int) fbuf;
  win.h.ah = 2;
  win.h.al = fnum;
  win.h.ch = ftrack;
  win.h.cl = fsector;
  win.h.dh = fhead;
  win.h.dl = fdrive;

  #if DEBUG
    printf("\n%04x %04x %04x %04x %04x",win.x.ax,win.x.bx,
	  win.x.cx,win.x.dx,wsegreg.es);
  #endif

  int86x(0x13,&win,&wout,&wsegreg);

  if (wout.x.cflag & 1 == 1) return(-1);
  else return(0);
}



