beautypg.com

Relational operators, Boolean operators, High and low operators – Zilog Z8F0130 User Manual

Page 313: Boolean operators high and low operators

background image

UM013037-1212

Relational Operators

Zilog Developer Studio II – Z8 Encore!

User Manual

289

You must put spaces before and after the modulus operator to separate it from the rest of
the expression.

Relational Operators

For use only in conditional assembly expressions.

Boolean Operators

HIGH and LOW Operators

The HIGH and LOW operators can be used to extract specific bytes from an integer
expression. The LOW operator extracts the byte starting at bit 0 of the expression, while
the HIGH operator extracts the byte starting at bit 8 of the expression.

HIGH and LOW can also be used to extract portions of a floating-point value.

For example:

# LOW (X) ; 8 least significant bits of X

# HIGH (X) ; 8 most significant bits of X

The syntax of these operators is:

<operator> <expression>

For example:

==

Equal

Synonyms: .eq., .EQ.

!=

Not Equal

Synonyms: .ne., .NE.

>

Greater Than

Synonyms: .gt., .GT.

<

Less Than

Synonyms: .lt., .LT.

>=

Greater Than or Equal

Synonyms: .ge., .GE.

<=

Less Than or Equal

Synonyms: .le., .LE.

&

Bitwise AND

Synonyms: .and., .AND.

|

Bitwise inclusive OR

Synonyms: .or., .OR.

^

Bitwise exclusive XOR

Synonyms: .xor., .XOR.

~

Complement

!

Boolean NOT

Synonyms: .not., .NOT.

Note: