Path: utzoo!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!ni.umd.edu!ni.umd.edu!zben From: zben@ni.umd.edu (Ben Cranston) Newsgroups: comp.sys.mac.programmer Subject: Re: Whaddya do in ioCompletion routine? Summary: Anybody seen this weird behaviour? Keywords: ioCompletion Asynchronous Message-ID: <1991Mar10.231236.21526@ni.umd.edu> Date: 10 Mar 91 23:12:36 GMT References: <63044@bbn.BBN.COM> <49791@apple.Apple.COM> <1991Mar7.204208.20535@jato.jpl.nasa.gov> Sender: usenet@ni.umd.edu (USENET News System) Distribution: comp Organization: University of Maryland at College Park Lines: 26 Nntp-Posting-Host: ni.umd.edu Anybody seen the behaviour with ASynch _Read calls: whatever is in D0 when the IO completion routine returns gets returned to the mainline in D0 rather than the IO result for the operation itself? I tend to code a check in the mainline: LEA IOPB,A0 _Read ASync BEq.S around around ; and in the completion routine Compl ; Tst.W D0 BEq.S around around ; and I find I have to be very careful to clear D0 at the exit of the completion routine or else the value will pop up as an error in the mainline. Also, anybody ever seen an asynch _Open and/or _Read return to the mainline with D0 = 1 and ioResult(A0) = 2???? I've only seen this when AppleShare Server was running in foreground...