5.6.2.6 .porg new-lc[, fill]

Advance the location counter of the current section to new-lc. In program memory,new-lc is specified in PC units. On the dsPIC33C/E/F device, the PC increments by 2 for each instruction word. Odd values are not permitted. On a dsPIC33A device, the PC increments by 4 for each instruction word.

Note: A location counter is not an absolute address but the offset from the start of the section in which the .porg occurs.

The bytes between the current location counter and the new location counter are filled with fill. new-lc is an absolute expression. You cannot .porg backwards. You cannot use .porg to cross sections.

The new location counter is relative to the current module and is not an absolute address.

This directive is only allowed in a code section. If not in a code section, a warning is generated and the rest of the line is ignored.

fill is optional. If not specified, it defaults to the last .pfillvalue specified.