Hi Thomas, The problem is that the labels within the macro are not being declared as "local". "Local" is a directive which tells the macro assembler that this label within the macro is only local to this macro and references to any other labels with the same string should be ignored. Using "local" try out this version of the macro: call_test macro label local here ; <-- "here" is now specific to inside macro goto here nop here call label endm ----- Original Message ----- From: "Thomas N" To: Sent: Thursday, July 05, 2001 5:47 PM 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