Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!ira.uka.de!smurf!smurf.ira.uka.de From: urlichs@smurf.ira.uka.de (Matthias Urlichs) Newsgroups: comp.sys.mac.programmer Subject: Re: For GURU'S Only Message-ID: <1533@smurf.ira.uka.de> Date: 14 Feb 90 19:13:39 GMT References: <4073@ccncsu.ColoState.EDU> <34253@ucbvax.BERKELEY.EDU> <6711@ucdavis.ucdavis.edu> Sender: news@smurf.ira.uka.de Organization: University of Karlsruhe, FRG Lines: 17 In comp.sys.mac.programmer, article <6711@ucdavis.ucdavis.edu>, vmrad@pollux (Bernard Littau) writes: < In article <34253@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: < < This will not work if the image (data in general) is larger than 64k < bytes. You will need both the serial buffer and a disk write buffer. < In the event loop, read from the serial buffer to the disk write < buffer every time through the loop. You must do this at least every < 10 seconds or the serial buffer will overflow. The disk write buffer < can be as large as memory allows. < I don't think you need a disk write buffer if you write to the hard disk. What I did was to call PBRead(serial port, (16 kByte or end of picture)) asynchronously, call WaitNextEvent with a reasonable timeout (based on the serial speed, how much you want to read, and how much is already there), and call PBWrite to your disk file if that call completes. Allocate a nice big serial buffer (maybe 48k)...