Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!sran124!srava!ariza From: ariza@srava.sra.JUNET (Michiharu Ariza) Newsgroups: comp.sys.mac.programmer Subject: Re: Serial Drivers @ Interrupt Time Message-ID: <3040@srava.sra.JUNET> Date: 6 Nov 89 01:44:09 GMT References: <4134@helios.ee.lbl.gov> Reply-To: ariza@srava.junet (Michiharu Ariza) Organization: Software Research Associates, Inc., Japan Lines: 17 In article <4134@helios.ee.lbl.gov> beard@ux1.lbl.gov (Patrick C Beard) writes: >I am attempting to use the serial drivers at VBL time. One question >I have is how to ask the input serial driver how much data it currently >has in its input buffers. Inside Macintosh states that the calls PBStatus >and PBControl may move memory, and yet PBStatus is the call I need to make >to find out the number of bytes in the serial driver buffer. How do I do it? I believe you can simply call PBStatus to get the number of available bytes without fear of moving memory. IM states that PBStatus may move memory since there are cscode varieties that may cause moving memory, but I cannot see any reason to move memory in order to calculate the number of available bytes, and actually it does not. I confirmed this by disassembling the serial driver code on my IIcx using TMON. Of course this is not stated in IM and may not be true on future machines and OS. Be warned. Michiharu (Michael) Ariza SRA, Inc., Tokyo, Japan