beautypg.com

Octal numbers, Character constants, Operator precedence – Zilog Z8F0130 User Manual

Page 316: Octal numbers character constants, Table 19

background image

Using the Macro Assembler

UM013037-1212

292

Zilog Developer Studio II – Z8 Encore!
User Manual

Octal Numbers

Octal numbers are signed 32-bit integers ending with the character

o

or

O

and consisting of

the characters

0

7

. An octal number can have 1 to 11 characters. Positive numbers are

indicated by the absence of a sign. Negative numbers are indicated by a minus sign (

-

)

preceding the number. Underscores (_) can be inserted between octal digits to improve
readability.

For example:

1234o ; octal number

-1234o ; negative octal number

1_234o; octal number with underscore

Character Constants

A single printable ASCII character enclosed by single quotes (

'

) can be used to represent

an ASCII value. This value can be used as an operand value.

For example:

'A' ; ASCII code for "A"

'3' ; ASCII code for "3"

Operator Precedence

The following table shows the operator precedence in descending order, with operators of
equal precedence on the same line. Operators of equal precedence are evaluated left to
right. Parentheses can be used to alter the order of evaluation.

Shift Left (<<) and OR (|) have the same operator precedence and are evaluated from left to
right. If you must alter the order of evaluation, add parentheses to ensure the desired opera-
tor precedence.


For example:

Table 53. Operator Precedence

Level 1

()

Level 2

~

unary- !

high

low

Level 3

**

*

/

%

Level 4

+

-

&

|

^

>>

<<

Level 5

<

>

<=

>=

==

!=

Note: