_ _MAXRAM - Define Maximum RAM Location

MPASM Assembler

_ _MAXRAM - Define Maximum RAM Location

Note: maxram is preceded by two underline characters, with no space in between these characters. A space is added here for readibility only.

Syntax

_ _maxram <expr>

Description

The _ _maxram and _ _badram directives together flag accesses to unimplemented registers. _ _maxram defines the absolute maximum valid RAM address and initializes the map of valid RAM addresses to all addresses valid at and below <expr>. <expr> must be greater than or equal to the maximum page 0 RAM address and less than 1000H. This directive is designed for use with the _ _badram directive. Once the
_ _maxram directive is used, strict RAM address checking is enabled, using the RAM map specified by _ _badram.

_ _maxram can be used more than once in a source file. Each use redefines the maximum valid RAM address and resets the RAM map to all locations.

Example

list p=16c622

__maxram H'0BF'

__badram H'07'-H'09', H'0D'-H'1E'

__badram H'87'-H'89', H'8D', H'8F'-H'9E'

movwf H'07' ; Generates invalid RAM warning

movwf H'87' ; Generates invalid RAM warning

; and truncation message

See Also

_ _BADRAM


Microchip Technology Inc.
Microchip's Web Site
Voice: (480) 792-7200
Fax: (480) 899-9210
Microchip's E-mail Address
PreviousNext