Download Assembler/Linker/Librarian User's Guide

Transcript
Directives
4.10
code_pack - BEGIN AN OBJECT FILE PACKED CODE SECTION (PIC18
MCUs)
4.10.1
Syntax
[label] code_pack [ROM_address]
4.10.2
Description
This directive declares the beginning of a section of program code or ROM data where
a padding byte of zero is not appended to an odd number of bytes. If label is not
specified, the section is named .code. The starting address is initialized to
ROM_address or will be assigned at link time if no address is specified. If
ROM_address is specified, it must be word-aligned. If padded data is desired, use db.
Note:
4.10.3
Two sections in a source file may not have the same name
Usage
This directive is used in the following types of code: relocatable. For information on
types of code, see Section 1.6 “Assembler Operation”.
This directive is commonly used when storing data into program memory (use with db)
or the EEPROM data memory (use with de) of a PIC18 device.
4.10.4
See Also
extern code global idata udata udata_acs udata_ovr udata_shr
4.10.5
Simple Example
0001F0 01 02 03
0001F3 04 05
000000 0201 0003
000004 0504
4.11
00001 LIST P=18Cxx
00002
00003 packed code_pack 0x1F0
00004
DB 1, 2, 3
00005
DB 4, 5
00006
00007 padded code
00008
DB 1, 2, 3
00009
DB 4, 5
00010
00011
END
__config - SET PROCESSOR CONFIGURATION BITS
Note:
4.11.1
config is preceded by two underline characters.
Syntax
Preferred:
__config expr
__config addr, expr
Note:
PIC18FXXJ devices do not support this directive. Use config directive (no
underline characters.)
Supported:
__fuses expr
© 2009 Microchip Technology Inc.
DS33014K-page 55