Ian- MPASM doesn't choke on multiple instances of: LCD_TX MACRO LOCAL rotate IFDEF DEBUG movlw 0x02 ELSE movlw 0x08 ENDIF movwf count_10 bcf STATUS,C bcf PORTB,CK nop ;Rest between bit ops. bsf PORTB,CH ;***Initialise the data port. rotate rlf charac,1 ;Rotate the the data thru CARRY, MSB first. btfss STATUS,C ;Data bit = 1? bcf PORTB,CH ;No - send a zero nop ;Rest between bit ops. bsf PORTB,CK ;Clock the bit thru nop nop ;Rest between bit ops. bcf PORTB,CK decfsz count_10,1 ;Stepped down thru 8 bits? goto rotate ;No - jump back to bsf PORTB,CH nop ;Rest between bit-ops. bsf PORTB,EN ;Enable the LCD and nop nop nop ;transfer the data. bcf PORTB,EN nop bcf PORTB,CH ;Leave PORTB in a defined state. All LOW. ENDM On 20 Jul 01 at 11:36, Ian Hynes wrote: > PICers, > I'm having a bit of trouble seeing how you declare local variables > in macros. Regards, Steve Boulder City, Nevada -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body