Keil Logo

LABEL Assembler Statement

Arguments
symbol 〚:〛 LABELtype
Description

The LABEL statement defines a symbol name for a location in a section. The defined label inherits the attributes of the parent section. It may not be defined outside a section. Label definitions may optionally include a type which specifies the type of access required by the assembler. If no type is specified, the label type is set based on the section (NEAR for Code Sections, BYTE for Data Sections, and BIT for Bit Sections).

type Description
NEAR The label receives the NEAR type which implies that it must be defined in a Code Section.
FAR The label receives the FAR type which implies that it must be defined in a Code Section.
BYTE The label receives the BYTE type which implies that it must be defined in a Code or Data Section.
WORD The label receives the BYTE type which implies that it must be defined in a Code or Data Section and must start at an even (word) address.
BIT The label receives the BYT type which implies that it must be defined in a Bit Section.

The assembler checks access types for mismatches and generates an error if a problem occurs.

Example
           RSEG    ECODE_SEG1      ; activate an ECODE segment
ENTRY:     LABEL   FAR             ; entry point

           RSEG    ECODE_SEG2      ; activate another ECODE segment
           EJMP    ENTRY           ; jump across 64KB segment
  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.