Examples, Add), And) – Zilog ZUSBOPTS User Manual

Page 302: Examples + (add) & (and)

Advertising
background image

Linker Expressions

UM017105-0511

274

Zilog Developer Studio II – ZNEO™
User Manual

| (Or)

– see page 279

<< (Shift Left)

– see page 279

>> (Shift Right)

– see page 279

- (Subtract)

– see page 279

TOP OF

– see page 280

^ (Bitwise Exclusive Or)

– see page 280

~ (Not)

– see page 280

The following note applies to many of the <expression> commands discussed in this sec-
tion.

To use BASE, TOP, COPY BASE, COPY TOP, LOWADDR, HIGHADDR, LENGTH, and
FREEMEM <expression> commands, you must have completed the calculations on the
expression. This is done using the SEQUENCE and ORDER commands. Do not use an
expression of the segment or space itself to locate the object in question.

Examples

/* Correct example using segments */

SEQUENCE seg2, seg1 /* Calculate seg2 before seg1 */

LOCATE seg1 AT TOP OF seg2 + 1

/* Do not do this: cannot use expression of seg1 to locate seg1

*/


LOCATE seg1 AT (TOP OF seg2 - LENGTH OF seg1)

+ (Add)

The + (Add) operator is used to perform the addition of two expressions.

Syntax

<expression> + <expression>

& (And)

The & (And) operator is used to perform a bitwise & of two expressions.

Note:

Advertising
This manual is related to the following products: