the idlocs line is an MPASM directive, it does the job at compile time. it store the value in a specific PIC location.. kinda black magic Check the MPASM user guide for all the details.