Hello, * On Sat, May 01, 2010 at 06:02:11PM +0200 Ullrich von Bassewitz wrote: > On Sat, May 01, 2010 at 05:47:39PM +0200, Spiro Trikaliotis wrote: > > As I believe other people might have problems: Uz, is it worth to add a > > work-around to the cbm I/O runtime library? > > I would say that depends on the complexity of the workaround. I had to think about this. The problem here is that the OPEN without a file name essentially is a no-op: It does not perform any IEC output. It only updates the internal KERNAL tables. Thus, it almost cannot fail. For sure, a "device not present" cannot be the answer, as the system does not try to open a file. So, the read afterwards falls into the trap of the bad implementation. The only workaround I can think of: When doing an open, and there is no filename, issue a LISTEN/UNLISTEN sequence. If the LISTEN fails, then there is no device attached. Then, let the OPEN fail. > The code is shared among all platforms, even those without the bug, so adding > code there will increase program size on all platforms. And the code must not > be C64 specific. The VIC20 and the C64 need the workaround. The Plus/4 does not, nor does the C128. Test with VICE: Need the workaround: - VIC20 - C64 Do *not* need the workaround: - Plus/4 - C128 - PET with BASIC 4.0, KERNAL 4.0 (but: Does not return with "DEVICE NOT PRESENT", instead status bit 1 (timeout on read) is set Regards, Spiro. -- Spiro R. Trikaliotis http://opencbm.sf.net/ http://www.trikaliotis.net/ http://www.viceteam.org/ ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Sun May 2 20:58:01 2010
This archive was generated by hypermail 2.1.8 : 2010-05-02 20:58:04 CEST