X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: 21 Dec 2003 14:33:40 +0200 Message-Id: From: Eli Zaretskii To: "Gisle Vanem" CC: djgpp AT delorie DOT com In-reply-to: <1d1801c3c7b6$b436a040$0600000a@broadpark.no> (giva@bgnett.no) Subject: Re: Is this optimizable ? References: <1d1801c3c7b6$b436a040$0600000a AT broadpark DOT no> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.