A macro is inserted every place you use it in the program... So your "here" label is being duplicated. nick@veys.com | www.veys.com/nick > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Thomas N > Sent: Thursday, July 05, 2001 4:47 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]: Label in macro problem. What's wrong? > > > Hi everyone, > > I saw many people's code uses label in their macro. But when > I try to use > it, MPLAB gives me this error: "Error[116] > C:\TEMP\MACRO.ASM 5 : Address > label duplicated or different in second pass (here)" > > What's wrong with my code? What do I have to do to get > around this "problem"? > > Thank you in advance! > Thomas > > ; in my main.asm file > > list p=16F877 > errorlevel -302 > > org 0x00 > goto start > org 0x04 > goto start > > include p16f877.inc > include "macro.asm" > > start > call_test function1 > call_test function2 > loop > goto loop > > ;---------------------------------------------- > function1 > nop > return > ;---------------------------------------------- > function2 > nop > return > > end > ============================================= > ; in my macro.asm file > call_test macro label > goto here > nop > here > call label > endm > ______________________________________________________________ > ___________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu