Specifying where to place code or data
Within a section it may be necessary to specify exactly where the assembler should place either code or data. For example in the interrupt vector table of the CPU. Or it may be necessary to produce a sequence of referneces to a specific area on the memory map, such as for memory mapped peripherals.
The .org statement allows the programmer to specify which part of the memory map the location counter should point to. subsequent use of the location counter will cause it to be incremented from that point on.[<label>] .org <expr>The label component of the .org statement is optional and if present causes the label to be defined so:.org <expr> <label>
BEWARE:The argument <expr> is used to change the location counter. If .org is used in a section that is counting in words (see location counter resolution) then the effective byte offset from the start of the section will be twice the value specified by <expr>. This should only be a concern when using data statements such as .db in code sections or translating byte addresses specified in documentation into word addresses.