SCL Reference: SFR
SFR
Special Function Register - a register that controls or interacts with the microcontroller or one of its on-chip peripherals.

SCL automatically creates variables that correspond to each of the SFRs on the current device. The variable name will be the same as the SFR. The SFR variable can then be assigned, tested, etc:

ADC1BUF0 <= #16#15F#;
if STATUS == 0 then

SFRs in SCL are modeled as records where the fields are the SFR fields become the record fields. This allows the user to reference the fields by name without having to manually mask and shift:

PIR3.ADIF <= 1;
if STATUS.Z == 0 then
© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.