Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbatt!osu-eddie!sppy00!sam From: sam@sppy00.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: device driver i/o Message-ID: <144@sppy00.UUCP> Date: Fri, 24-Apr-87 08:59:48 EDT Article-I.D.: sppy00.144 Posted: Fri Apr 24 08:59:48 1987 Date-Received: Sat, 2-May-87 01:10:26 EDT References: <265@fornax.uucp> Reply-To: sam@sppy00.UUCP (Sam A Moore) Organization: Online Computer Library Center, Dublin, Ohio. Lines: 70 In article <265@fornax.uucp> chapman@fornax.uucp (John Chapman) writes: >; > >I have two questions: > >1. Is there any way to stop DOS from saying EOF when a character > device recieves a ctrl/z ? I have tried opening files in > binary mode (in MS C 3.0) but the problem still occurs. > The device in question sends arbitrary bit patterns. > >2. Is there any way to get DOS to send/recieve more than one > character at a time to character device drivers? I know > the DOS function call lets you specify n (>=1) characters > but the device driver then gets called n times to process > one character at a time. This is stupid. I see the reason > for some circumstances but there ought to be a way to turn > it off so the driver can process large chunks of data per > invokation. > >Thanks for any help, > > john > The answer to the second question is to place the driver in raw mode. This is done with DOS ioctl function 44 hex. I don't know what the answer to the first problem is. If you find out please post it. Below is a crude example of how to place the console driver in raw mode. Block type transfer between DOS and the driver is not all that you get with raw mode. Check the DOS Tech. Ref. for other changes. - cut - /* program to switch console device into/out of raw mode */ /* Microsoft C */ #include #include #include main(argc, argv) int argc; char *argv[]; { union REGS regs; regs.x.ax = 0x4400; regs.x.bx = 1; intdos( ®s, ®s ); regs.h.dh = 0; if (argc > 1) { if (strcmpi( "ON", argv[1] )) regs.h.dl &= 0xDF; else regs.h.dl |= 0x20; } else regs.h.dl ^= 0x20; regs.x.ax = 0x4401; intdos( ®s, ®s ); } >-- >{watmath,seismo,uw-beaver}!ubc-vision!fornax!sfulccr!chapman > or ...!ubc-vision!sfucmpt!chapman