Sorry, resending with [PIC] tag... 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 .