Thanks to Bob and Chris for the help! I created a "header" file, put the=20 "#defines" statements in it and included that "header" file in my source=20 files. Works great and I now understand why the compiler/linker was=20 displaying those errors. Thanks guys, -rob Original Message Hello Hello Hello You have to put your #defines in a header file that you include in both=20 source files. This is because #defines are just text substitution. So=20 this makes it easy to understand your label error: given: GLOBAL flag_X after textual substitution, which gets rid of the #defines and replaces=20 references to them with their text value, what the assembler sees thus: GLOBAL 2 which is obviously illegal. -- Bob Ammerman RAm Systems Original Message Hello , Using assembly and I'm trying to learn to split my programs into=20 relocatable modules and can't seen to be able to reference a flag which=20 is declared in a relocatable file. Here is an example of what I've tried=20 to do: In my relocatable sub .asm file I have: GLOBAL vFlag_var vFlag_var res 1 ;register to hold flag bits #define flag_X 2 ;define a label to a bit number for use as=20 a flag GLOBAL flag_X ;this seems to generate a 121 error:=20 "illegal label (2)" Then in my main code file, I intended to access the flag with: EXTERN vFlag_var EXTERN flag_X btfss vFlag_var, flag_X So why does this not work ? Why does this cause an illegal label error? Also I've tried to use a flag this way (which I prefer): GLOBAL vFlag_var vFlag_var res 1 #define MyFlag vFlag_var,2 BLOBAL MyFlag ;but this also causes a 121 error:=20 "illegal label (2)" So how do you define a flag bit to a variable and declare it GLOBAL so=20 that you can access it using an EXTERN from another file? Thanks for any help! -rob --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .