---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id AD4B45AA003C; Fri, 30 Jan 2004 22:38:03 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <13.00CC60E0@cherry.ease.lsoft.com>; Sat, 31 Jan 2004 1:37:51 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 3445 for PICLIST@MITVMA.MIT.EDU; Sat, 31 Jan 2004 01:37:44 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 2470; Sat, 31 Jan 2004 01:36:22 -0500 Received: from *unknown [207.251.201.58] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with SMTP ; Sat, 31 Jan 2004 01:36:22 EST X-Warning: mitvma.mit.edu: Could not confirm that host [207.251.201.58] is extsmtp2.localnet.com Received: (qmail 3884 invoked from network); 31 Jan 2004 06:30:59 -0000 Received: from unknown (HELO smtp1.localnet.com) (10.0.7.18) by extsmtp2.localnet.com with SMTP; 31 Jan 2004 06:30:59 -0000 Received: (qmail 23265 invoked from network); 31 Jan 2004 06:31:08 -0000 Received: from unknown (HELO kmp) (63.246.198.104) by smtp3.localnet.com with SMTP; 31 Jan 2004 06:31:08 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Sat, 31 Jan 2004 01:31:11 -0500 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Ken Pergola Subject: Re: [PIC]: Hitech PICCLITE state machine optimization To: PICLIST@MITVMA.MIT.EDU In-Reply-To: Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856644 Hi Herbert, If you are using PICC Lite v8.02PL1, you might want to experiment with this: >From HI-TECH's web site: { There has been a new pragma introduced to control the code generated for switch statements. This allows code to be generated for applications which are time-critical or rely on minimal code size (ie: state machines). A jump table may be generated in preference to a direct comparison or vice versa. #pragma switch direct 5.13.3.5 The #pragma switch Directive Normally the compiler decides the code generation method for switch statements which results in the smallest possible code size. Specifying the direct option to the #pragma switch directive forces the compiler to generate the table look-up style switch method. This is mostly useful where either timing or code size is an issue for switch statements (ie: state machines) and a jump table is preferred over direct comparison or vice versa. This pragma affects all code generated onwards. The auto option may be used to revert to the default behaviour. } Herbert, this new pragma was introduced in PICC v8.02PL1, so it *may* also work with PICC Lite v8.02PL1. Best regards, Ken Pergola -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu .