_ _BADROM - Identify Unimplemented ROM

MPASM Assembler

_ _BADROM - Identify Unimplemented ROM

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

Syntax

_ _badrom <expr>[-<expr>][, <expr>[-<expr>]]

Description

The _ _maxrom and _ _badrom directives together flag accesses to unimplemented registers. _ _badrom defines the locations of invalid ROM addresses. This directive is designed for use with the _ _maxrom directive. A _ _maxrom directive must proceed any _ _badrom directive. Each <expr> must be less than or equal to the value specified by _ _maxrom. Once the _ _maxrom directive is used, strict ROM address checking is enabled, using the ROM map specified by _ _badrom. To specify a range of invalid locations, use the syntax <minloc> - <maxloc>.

Specifically, a warning will be raised in the following circumstances:

  • the target of a GOTO or CALL instruction is evaluated by the assembler to a constant, and falls in a bad ROM region
  • the target of an LGOTO or LCALL psuedo-op is evaluated by the assembler to a constant, and falls in a bad ROM region
  • a .hex file is being generated, and part of an instruction falls in a bad ROM region
  • Example

    See the example for _ _maxrom.

    See Also

    _ _MAXROM


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