Keil Logo

ASSIGN Linker Directive

Abbreviation

AS

Arguments

ASSIGN (symbolname (value) 〚, ...〛)

Default

None.

µVision

Options — LX51 Misc — Assign.

Description

The ASSIGN directive defines a PUBLIC symbol (symbolname) and assigns it a numeric value (value). The defined symbol is typically used to provide a value for (or resolve) an external symbol used in your program.

Example
LX51 myfile.obj ASSIGN (FUNC (0x2000), BITVAR (20H.2))

This example defines the public symbols func and bitvar with the values 0x2000 and 20h.2 respectively.

Notes

  • Public symbols defined with the ASSIGN directive exist only at locate time and are not symbolically included in the object module. Therefore, they cannot be accessed by an emulator or the µVision Debugger.
  • Values given in the ASSIGN directive may be truncated without any warning when used in combination with assembly instructions. For example, for instruction MOV DPTR,#value only the lower 16-bit are used.
  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.