4.9 Config Directive

The MPASM CONFIG directive sets the device's configuration bits.

Suggested Replacement

The PIC Assembler's CONFIG directive is a direct replacement, but ensure that the settings and values used with the directive are correct for your device.

This directive can be used for all devices. The following example shows the different ways it can be used to program individual configuration bits, a configuration word as a whole, or ID location values.
; PIC18F67K22
; VREG Sleep Enable bit : Enabled
; LF-INTOSC Low-power Enable bit : LF-INTOSC in High-power mode during Sleep
; SOSC Power Selection and mode Configuration bits : High Power SOSC circuit selected
; Extended Instruction Set : Enabled
config RETEN = ON, INTOSCSEL = HIGH, SOSCSEL = HIGH, XINST = ON

; Alternatively, set the entire word
config CONFIG1L = 0x5D

; IDLOC @ 0x200000
config IDLOC0 = 0x15

See the MPLAB® XC8 PIC Assembler User's Guide for full information on this directive.