> -----Original Message----- > From: Bob Blick [SMTP:bobblick@COVAD.NET] > Sent: Wednesday, May 14, 2003 12:37 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: HiTech PICC fast switch case > > John Temples said: > > On Tue, 13 May 2003, Bob Blick wrote: > > > >> Does the latest version of PICC include a pragma for doing switch-case > >> with a lookup table instead of the clever way it defaults to? > > > > No, it does it automatically. It appears to do a code size analysis and > > will use either a lookup table or the "old" method, depending on which > > generates less code. You can look at your assembly listing to see what > > it's done. > > But if you want identical latency for all cases you are out of luck. > Unless you plan to do it yourself with inline assembler and then good luck > with PCLATH. > > Cheerful regards, > > Bob > I used an array of function pointers to get around this problem. A little overkill for very small switch blocks though. Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.