X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: krugman AT yahoo DOT co DOT uk (Kev) Newsgroups: comp.os.msdos.djgpp Subject: Re: Is this optimizable ? Date: 25 Dec 2003 11:36:43 -0800 Organization: http://groups.google.com Lines: 35 Message-ID: References: <1d1801c3c7b6$b436a040$0600000a AT broadpark DOT no> NNTP-Posting-Host: 195.92.194.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1072381003 13000 127.0.0.1 (25 Dec 2003 19:36:43 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Thu, 25 Dec 2003 19:36:43 +0000 (UTC) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote in message news:... > > From: "Gisle Vanem" > > Date: Sun, 21 Dec 2003 12:36:41 +0100 > > > > > > I am giving the compiler the -O3 option > > > > > > Only trouible is, my for() loop is not fast enough. > > > > How do to know? It may be your board is insert wait-states betwen > > each port read. > > Good questions, IMHO. The OP is encouraged to post information about > the speed of the for-loop, and why is that ``not fast enough''. > > > You can use a "rep insb" or "rep insw" instructions if > > the board can keep up. > > > > extern inline void rep_insb (unsigned short port, unsigned char *buf, size_t bytes) > > DJGPP already has in its library functions inportsb, inportsw, and > inportsl to do this. Thanks for the help on this. I hadn't come accross that inportsb function before and tried that. Still not quick enough and I am now thinking that I need a little more hardware between the data source and the PC as I calculated that I would need a PC 10 times quicker than the 850MHz celleron I was using. Even if I did make the PC ten times quicker I would then also be beyond the abilities of this capture card. I have decided to do the fast work in hardware and then hand the rest of the job to the PC. Thanks Sourcerer.