Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!mattd From: mattd@Apple.COM (Matt Deatherage) Newsgroups: comp.sys.apple Subject: Re: Serial Port Status questions... Message-ID: <38537@apple.Apple.COM> Date: 11 Feb 90 23:41:23 GMT References: <269@bucsb.UUCP> Distribution: na Organization: Apple Computer Inc, Cupertino, CA Lines: 39 In article <269@bucsb.UUCP> ghost@bucsf.UUCP (Jay Adelson) writes: > >A question for all you GS experts: > > I know how to read the 16-bit status register (or at least I'm reading >16 bits) with the GS/OS DStatusGS call, but I don't know what any of the bits >mean, except that an AND mask of $0020 checks if the receive register is full. >Now, what I need to know is WHAT DO THE OTHER BITS REPRESENT?? Specifically, >I need to know which bits represent ready to transmit, and carrier detect. >I would like to know what all of them mean, though.... > > If someone could send me this info, I would be eternally grateful! > >thanks in advance, > -J > ghost@bucsf.bu.edu Not quite. Close, in some respects, but not enough to avoid a paragraph of background. (everyone may groan now) Bit 5 ($0020) in the status word returned in the Status List by DStatus indicates, for character devices, if there is at least one character ready to be read. It does NOT indicate "receive register full" or anything other than there is at least one character to be read. This limitation is because the drivers here (serial port drivers) are generated drivers, and because of the small fact that the only firmware protocol that supports this at all is the Pascal 1.1 protocol, which says "at least one character is ready", that's all the generated drivers can do. (Caution: Sentence Mangling) The other bits indicate things like whether the device is open, generated, block or character, etc. This is all described in GS/OS Reference Volume 2, which is an ABSOLUTE MUST for anyone doing programming like this. -- ============================================================================ Matt Deatherage, Apple Computer, Inc. | "The opinions represented here are Developer Technical Support, Apple II | not necessarily those of Apple Group. Personal mail only, please. | Computer, Inc. Remember that." ============================================================================