SECTION V-9: ORG - Origin, END, LIST, #include, _config, radix Directives

ORG, Origin :-

The ORG directive is used to indicate the begining of the address. It can be used for both code and data. The number that comes after ORG must be in Hex.

END Directive:-

The important pseudocode directive is END. This indicates to the assembler the end of the source, asm file. The END directive is that last line of the PIC program, meaning that anything after the END directive in the source code is ignored by the assembler.

LIST Directive:-

END and ORG are used my all assemblers. LIST directive is unique to the PIC assembler. It indicates to the assembler the specific PIC chip for which the program should be assembled. It is used as follows.

LIST P = 18F458


The above tells the PIC assembler to assemble the program specifically for the PIC18F458 microcontroller. We use LIST to state the target chip.

#include Directive:-

The #include directive tells the PIC assembler to use the libraries associated with the specific chip for which we are compiling the program.

_config Directive:-

The _config directive tells the assembler the configuration bits for the targeted PIC chip. It is important to use the correct _config directive, because incorrect use may make the chip unusable. The configuration bits are read during power-up of the PIC device and are stored at location 300000H. Microchip has defined the _config directive symbols to ease the configuration. These symbols are located in the .INC file for the device that is being used.

redix Directive:-

The redix directive can be use to indicate whether the numbering system is hexadecimal or decimal. The default is hex if we do not use the redix directive. If we use "redix dec", the default representation will change to decimal and any unformatted number will be interpreted as decimal rather than HEX.

More From