_ _MAXROM - Define Maximum ROM Location
Note:maxromis 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
_ _maxromand_ _badromdirectives together flag accesses to unimplemented registers._ _maxromdefines 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_ _badromdirective. Once the_ _maxromdirective is used, strict ROM address checking is enabled, using the ROM map specified by_ _badrom.
_ _maxromcan 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 |
![]()
|

