5.6.2.5 .org 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 DSC device, the PC increments by 2 for each instruction word. Odd values are not permitted.

Note: A location counter is not an absolute address but the offset from the start of the section in which the .org 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 .org backwards. You cannot use .org to cross sections.

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

fill is optional. If not specified:

  • In a data section, a value of 0x00 is used to fill the skipped bytes.
  • In a code section, the last specified .fillvalue is used to fill the lower two bytes of program memory and the last specified .fillupper is used to fill the upper program memory byte.