ridder@warlok.dec.com (07/02/86)
======== Date: 2 Jul 1986 1342-MDT From: Hans <RIDDER@WARLOK> To: "net.micro.amiga"@DECWRL Reply-to: Ridder@WARLOK Subject: More errors from console.device Message-ID: <"MS11(5235)+GLXLIB5(0)" 12219533534.13.143.116375 at WARLOK> I realize that Commodore-Amiga has made no explicit statement that they will answer all (or any) questions presented in this forum, but they seem to answer some and not others. I really wish that I could get an acknowledgement from them even if it basically says "I dunno". At least I would then know to go off and do some further spelunking. Perhaps I'm supposed to submit this as a bug to the special address? If so, then how do I know when to do that? I'm not even sure this is a bug! I notice that people can ask questions about accesing the ConUnit structure, and about various escape sequences, and get answers. I don't want to seem like I'm whining about not getting enough attention, but I am trying to write applications too! Anyway, enough of that.... 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. So, could someone at CA please (oh please) tell me if I have stumbled onto the source of the error? The section on Devices in the RKM *did* tell me to check it for possible errors, now what does it mean? -hans P.S. If I'm supposed to send this to the bug address, would someone at CA please forward it or tell me and I will? --------
rokicki@Navajo.UUCP (07/03/86)
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
jimm@amiga.UUCP (James D. Mackraz) (07/03/86)
In article <4021@decwrl.DEC.COM> ridder@warlok.dec.com writes: > > ======== > >Date: 2 Jul 1986 1342-MDT >From: Hans <RIDDER@WARLOK> >To: "net.micro.amiga"@DECWRL >Subject: More errors from console.device > >I realize that Commodore-Amiga has made no explicit statement >that they will answer all (or any) questions presented in this >forum, but they seem to answer some and not others. I really >wish that I could get an acknowledgement from them even if it >basically says "I dunno". At least I would then know to go off >and do some further spelunking. Perhaps I'm supposed to submit >this as a bug to the special address? If so, then how do I >know when to do that? I'm not even sure this is a bug! I >notice that people can ask questions about accesing the ConUnit >structure, and about various escape sequences, and get answers. >I don't want to seem like I'm whining about not getting enough >attention, but I am trying to write applications too! Anyway, >enough of that.... > >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. So, could someone at CA please (oh please) tell me >if I have stumbled onto the source of the error? The section on >Devices in the RKM *did* tell me to check it for possible errors, >now what does it mean? > >-hans > >P.S. If I'm supposed to send this to the bug address, would someone >at CA please forward it or tell me and I will? > -------- This question was answered on this very network. Indeed, the handling in 1.1 is incorrect, and is fixed in the current beta version. Are you a certified developer? If so, your proper course would have been to call West Chester, so you could get your question tracked and answered. Even if not, we appreciate your having reported the problem through any means. The correct method to report bugs is, of course, (are you listening Matt?): {hplabs,decwrl}!pyramid!amiga!bugs other local addresses, including amiga!support, have also been posted and work fine. Continued thanks to all for mailing in bug reports. Finally, I want to comment on our support via this network. Unofficially, quite a few of us at Amiga and West Chester read this net and comment on any question that we know the answer of. It is not in anybody's job description to make sure that all questions (esp. the hard ones) get answered. We are still waiting for the news that a certain bulletin board will be the official repository of amiga online support, but it has been long in coming. Put another way, you have no reason to expect that a question posted to this newsgroup are going to get acknowledged. In the case of Hans' problem, we in fact did reply, largely because the problem was serious. If you are a certified developer you can do better by contacting West Chester developer support. If not, you get the occasional benefits of the good efforts of our curtailed staffs. Thanks. jimm
mic@ut-ngp.UUCP (Mic Kaczmarczik) (07/04/86)
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 ----- | +----------------------+
ridder@warlok.dec.com (07/10/86)
======== Date: 10 Jul 1986 1149-MDT From: Hans <RIDDER@WARLOK> To: "net.micro.amiga"@DECWRL Reply-to: Ridder@WARLOK Subject: Re: More errors from console.device Message-ID: <"MS11(5235)+GLXLIB5(0)" 12221610030.25.143.2634 at WARLOK> (The gateway I use died right after I sent my message, so I missed any replies. I did however read one reply from Mic Kaczmariczik(?), from an archive on trantor (wonder what happened to the others?). I would appreciate it if someone would forward the replies to me (please send a short message first, incase someone else already sent them to me!).) Tom - In reference to your first question, I really don't think devices should return ANYTHING but errors in io_Error. However, if CA wants to DOCUMENT that when a certain bit is set in io_Flags after a write means that the error isn't, then I wouldn't mind. I would rather they implement a device specific command for it instead (like the serial.device). Really, what do the number of input characters available have to do with a WRITE request? As to your second question, Mic seems to think we are talking about the serial.device. But the answer is still yes for the console.device. CMD_READ for the console device will return AS MANY characters as are avalable in the buffer (up to your io_Length), all you need to do is check io_Actual after the read to see how many characters you got. Essentially all CMD_READs of the console.device are non blocking, unless there are NO type-ahead characters available, then you WILL block. (Assuming DoIO()s of course). If you are using SendIO() or BeginIO(), then you can just check io_Actual after you get the reply. Although fast typists are not usually a problem for most terminal programs, posting a READ for multiple characters might lower the message traffic caused by 1 character reads of the console.... There is also the case of IOF_QUICK, but you can figure that out on your own :-}. But I still want to know what the error is! Please won't someone tell me? -hans --------