Keil Logo

XSEG Assembler Statement

Arguments
XSEG 〚AT address
Description

The XSEG statement selects an absolute segment within XDATA space.

If the optional address is included, the assembler starts the absolute segment from that address. The valid address range is 0000h-0FFFFh.

If the optional address is omitted, the assembler starts the absolute segment from address 0 (if no prior absolute XDATA segment was defined). If an absolute XDATA segment was previously defined, the assembler continues from the end of that segment.

Note

  • The start address must be an absolute expression.
  • The AX51 Assembler converts XSEG statements into the following:
    ?XD?modulename?n SEGMENT OFFS address
    

    Where

    modulename is the name of the source file.
    n is a sequential number.
    address is the address specified in the XSEG statement.
See Also

BSEG, CSEG, DSEG, ISEG, XDATA

Example
           XSEG  AT 1000H     ; absolute XDATA segment
                              ; at 0x1000

OEM_NAME:  DS    25           ; 25 bytes space
                              ; for variable OEM_NAME

PRD_NAME:  DS    25           ; 25 bytes space
                              ; for variable PRD_NAME

VERSION:   DS    25           ; 25 bytes space
                              ; for variable VERSION
  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.