_ _MAXROM - Define Maximum ROM Location
Note:maxrom
is preceded by two underline characters, with no space in between these characters. A space is added here for readibility only.
Syntax
_ _maxrom <expr>
Description
The
_ _maxrom
and_ _badrom
directives together flag accesses to unimplemented registers._ _maxrom
defines the absolute maximum valid ROM address and initializes the map of valid ROM addresses to all addresses valid at and below<expr>
.<expr>
must be greater than or equal to the maximum ROM address of the target device. This directive is designed for use with the_ _badrom
directive. Once the_ _maxrom
directive is used, strict ROM address checking is enabled, using the ROM map specified by_ _badrom
.
_ _maxrom
can be used more than once in a source file. Each use redefines the maximum valid ROM address and resets the ROM map to all locations.Example
list p=12c508
__maxrom 0x1FF
__badrom 0x2 - 0x4, 0xA
org 0x5
goto 0x2 ; generates a warning
call 0x3 ; generates a warning
org 0xA
movlw 5 ; generates a warning
See Also
Microchip Technology Inc. Microchip's Web Site Voice: (480) 792-7200 Fax: (480) 899-9210 Microchip's E-mail Address |