Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga.tech Subject: Re: Serial.device Message-ID: <9201@cbmvax.commodore.com> Date: 4 Jan 90 00:15:41 GMT References: <89122504041593@masnet.uucp> Reply-To: valentin@cbmvax.commodore.com (Valentin Pepelea) Organization: Commodore, West Chester, PA Lines: 35 In article <89122504041593@masnet.uucp> jonathan.forbes@canremote.uucp (JONATHAN FORBES) writes: >Is there any way I can get a program to send to the serial device and >the console device at the same speed? The console is obviously much >faster, and finishes displaying its text long before the serial device >does. > >I tried making them print only 10 characters at a time, but for some >reason, this makes no difference. It probably has something to do with The sequence of calls to the I/O routines should look something like this: BeginIO(foo) /* 10 chars to serial.sevice */ BeginIO(bar) /* 10 chars to console.device */ WaitIO(foo) /* wait for the serial.device to finish */ WaitIO(bar) /* wait for the console.device to finish */ This way, the 10 characters are still spit out to the concole much faster than to the serial port, but a certain synchronisation is maintained. Perhaps the fault in your code was that you were using SendIO() without waiting for the completion of the IO request before issuing the next SendIO(). DoIO() automatically Wait()'s for the request to finish, but obviously the sequence DoIO(foo) DoIO(bar) is not as good as the one listed above. BeginIO() is in amiga.lib. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may distroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be