You can't export a symbolic constant using global like you would do with a variable, it doesn't have an address nor occupies space anywhere. Global tells the assembler not to remove the symbol name from the object-file symbol table, so the linker can use it later to fix-up references to the symbol from other object-files. Extern just tells the assembler that somewhere there is a symbol with a given name that it can use and the linker will cope with later. The more correct form is to define it in a file and include it where it is needed, overkill or not. Best regards, Isaac Em 12/3/2010 19:53, Brendan Gillatt escreveu: > Hello list, > > I'm developing a multi-module MPASM project and have run into a bit of a > problem. > > Say I have two modules, each requiring the use of a constant, 0xAA in > this case. I could put > > | > | constant testconst =3D 0xAA > | > > or > > | > |testconst equ 0xAA > | > > in both files but this is obviously not very elegant or easy to maintain. > > I have tried to define the constant--using both methods above--and using > GLOBAL and EXTERN statements to "share" the constant between modules as I > would with variable and code labels. This causes MPASM to throw: > > "Duplicate label ("testconst" or redefining symbol that cannot be > redefined)" > > I could put the testconst in a .inc file and include in both modules, but > this seems like overkill just for the odd constant. > > Is there a proper way to do this? > > Thanks, > Brendan __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist