3.3.2.3 How Do I Access SFRS?

The compiler ships with header files, see 7.4 ID Locations, that define variables which are mapped over the top of memory-mapped SFRs. Since these are C variables, they can be used like any other C variable and no new syntax is required to access these registers.

Bits within SFRs can also be accessed. Bit-fields are available in structures which map over the SFR as a whole. See 9.5.2 Bit Fields in Structures.

The name assigned to the variable is usually the same as the name specified in the device data sheet. See 3.3.2.4 How Do I Find The Names Used To Represent SFRs And Bits? if these names are not recognized.