LARM User's Guide

Discontinued

ASSIGN Linker Directive

Abbreviation

AS

Arguments

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

Default

None.

µVision

Options — L166L251LX51LA 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
L166L251LX51LA myfile.obj ASSIGN ('func' (0x2000), 'bitvar' (0FD20H.2))

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

L166L251LX51LA 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.

L166L251LX51LA 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.