Keil Logo

OPT

12.56 OPT

The OPT directive sets listing options from within the source code.

Syntax

OPT n
where:
n
is the OPT directive setting. The following table lists the valid settings:

Table 12-2 OPT directive settings

OPT n Effect
1
Turns on normal listing.
2
Turns off normal listing.
4
Page throw. Issues an immediate form feed and starts a new page.
8
Resets the line number counter to zero.
16
Turns on listing for SET, GBL and LCL directives.
32
Turns off listing for SET, GBL and LCL directives.
64
Turns on listing of macro expansions.
128
Turns off listing of macro expansions.
256
Turns on listing of macro invocations.
512
Turns off listing of macro invocations.
1024
Turns on the first pass listing.
2048
Turns off the first pass listing.
4096
Turns on listing of conditional directives.
8192
Turns off listing of conditional directives.
16384
Turns on listing of MEND directives.
32768
Turns off listing of MEND directives.

Usage

Specify the --list= assembler option to turn on listing.
By default the --list= option produces a normal listing that includes variable declarations, macro expansions, call-conditioned directives, and MEND directives. The listing is produced on the second pass only. Use the OPT directive to modify the default listing options from within your code.
You can use OPT to format code listings. For example, you can specify a new page before functions and sections.

Example

        AREA    Example, CODE, READONLY
start   ; code 
        ; code
        BL      func1
        ; code
        OPT 4                ; places a page break before func1
func1   ; code
Related reference
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.