---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id A10214A601F4; Wed, 28 Jan 2004 16:17:06 -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 <12.00CC1B07@cherry.ease.lsoft.com>; Wed, 28 Jan 2004 19:16:56 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 0550 for PICLIST@MITVMA.MIT.EDU; Wed, 28 Jan 2004 19:16:48 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 9553; Wed, 28 Jan 2004 19:15:27 -0500 Received: from penguin-ext.wise.edt.ericsson.se [193.180.251.47] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with ESMTP ; Wed, 28 Jan 2004 19:15:26 EST X-Comment: mitvma.mit.edu: Mail was sent by penguin-ext.wise.edt.ericsson.se Received: from esealnt612.al.sw.ericsson.se ([153.88.254.118]) by penguin-ext.wise.edt.ericsson.se (8.12.10/8.12.10/WIREfire-1.8b) with ESMTP id i0T0FSYG029887 for ; Thu, 29 Jan 2004 01:15:28 +0100 (MET) Received: by esealnt612.al.sw.ericsson.se with Internet Mail Service (5.5.2657.72) id ; Thu, 29 Jan 2004 01:15:28 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F5640CEF@ESEALNT442.al.sw.ericsson.se> Date: Thu, 29 Jan 2004 01:14:47 +0100 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: "Jan-Erik Soderholm XA (TN/PAC)" Subject: Re: [PIC]: Re: Trouble assembling code for 16F84A To: PICLIST@MITVMA.MIT.EDU Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856175 Tom Dickinson wrote : > After I get this running, I plan to post the code and ask for a > critique of style, bad practice etc. It's about 200 lines of code, is > that too long to post? Hi ! We could always start with the 4 lines you posted. :-) > poll_input btfsc PORTA, 0 Would be better to create a meaningfull symbol with a name that tells you (and everybody else) what's connected to bit 0 of port A. Something like : Switch EQU PORTA,0 and then poll_input btfsc Switch > goto count_in > goto poll_input > > count_in bcf INTCON, 7 ;disable global interrupts Don't use numeric bits in *any* FSR. They have all meaningfull names setup in the device INC file. Makes it much easier to read (and to spot errors). In this case i *think* that you mean : > count_in bcf INTCON, GIE (Note that you don't need the comment any more !) Jan-Erik. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics .