Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!ut-sally!ut-ngp!mic From: mic@ut-ngp.UUCP (Mic Kaczmarczik) Newsgroups: net.micro.amiga Subject: Re: More errors from console.device Message-ID: <3611@ut-ngp.UUCP> Date: Fri, 4-Jul-86 16:46:26 EDT Article-I.D.: ut-ngp.3611 Posted: Fri Jul 4 16:46:26 1986 Date-Received: Sun, 6-Jul-86 01:08:16 EDT References: <4021@decwrl.DEC.COM> <725@Navajo.ARPA> Reply-To: mic@ngp.UUCP (Mic Kaczmarczik) Organization: UTexas Computation Center, Austin, Texas Lines: 46 In article <725@Navajo.ARPA> rokicki@Navajo.UUCP writes: >In article <4021@decwrl.DEC.COM>, ridder@warlok.dec.com writes: >> Further mucking with the console.device seems to indicate that >> a CMD_WRITE returns with io_Error set to the number of characters >> queued for input! This is very handy data to have, but why >> return this in io_Error (for a WRITE)? Isn't this just a bit >> perpendicular to the purpose of io_Error? Besides it isn't even >> documented. . . . > >Is this intentional, supported, etc.? I am sick of terminal emulation >programs which run at an effective 1200 baud on a 9600+ line; this >would solve that problem. So, two questions: > > -- Can we count on this in programs we write? > > -- If not, is there any other way to get this information (a >non-blocking read of n characters which returns as many as are in the >queue would do)? > >This is essential for reasonable use of the serial port . . . > >-tom To answer your second question, yes, there is a way to find out how many characters are available from the serial.device: the serial device command SDCMD_QUERY returns the number of characters currently available from the serial device, in the io_Actual field of the IO request. Documentation is in page B-74 of my copy of the RKM (serial.device/Query). When I put this in my (very hacked-up) copy of AmigaTerm, it made quite a bit of difference! (Setting the buffer size to 1024 also helps.) Mic Kaczmarczik ------------------------------------------------------------------------- "From strawberries under torture one can learn many things" -- Stanislaw Lem /-------------\ | /---------\ | User Services Digital Support Group | | | | University of Texas at Austin Computation Center | | | | UUCP: ...!ihnp4!seismo!ut-sally!ut-ngp!mic | \_________/ | ARPA: mic@a20.cc.utexas.edu \_____________/ +----------------------+ |v ----- | +----------------------+