/************************************************************************/ /* **** dosraw **** */ /* */ /* */ /* Copyright (C) Egberto Willies, 1989 */ /* All rights reserved. */ /* */ /************************************************************************/ /* $Header: o:/projects/commdrv/work/sources/rcs/dosraw.c 1.1 1995/02/08 22:06:10 unknown Exp $ */ /************************************************************************/ #define FILE_DOSRAW_C /************************************************************************/ /************************************************************************/ /* ----- Include & Module Definitions ----- */ /************************************************************************/ #include #include #include #include #include #include #include #include /************************************************************************/ /************************************************************************/ /*Routine- */ /* dos_raw */ /*Author- */ /* Egberto Willies. */ /*Date- */ /* 23-Jun-1989 */ /*Description- */ /* Puts device in raw mode. */ /* */ /*Calling_Sequence- */ /* stat = dosraw(dev) */ /* */ /* char *dev; */ /* Device name. */ /* */ /*Return- */ /* int stat; */ /* 0 if successful. */ /* */ /*Notes- */ /* */ /************************************************************************/ dos_raw(int h) { union REGS in; union REGS out; /* Get device status word */ in.h.ah = 0x44; in.h.al = 0x00; in.x.bx = h; int86(0x21,&in,&out); if (out.x.cflag != 0) return(-1); /* Put device status word */ in.h.al = 1; in.x.dx = (out.x.dx | (1<<5)) & 0x00ff; int86(0x21,&in,&out); if (out.x.cflag != 0) return(-1); return(0); } /****************************************************************/