Conditional assembly, Repeat sequence of operations, While sequence of operations – Zilog Z8F0130 User Manual

Page 349

Advertising
background image

UM013037-1212

Conditional Assembly

Zilog Developer Studio II – Z8 Encore!

User Manual

325

.$REPEAT Sequence of Operations

The following sequence of operations is performed in processing the

.$REPEAT

struc-

tured assembly test directives:

1. The assembler generates object code to evaluate the conditions specified on the

.$UNTIL

directive and on any optional

.$BREAK

and

.$CONTINUE

directives.

2. At execution-time, the object code generated from statements in the structured assem-

bly block are executed until the specified condition is true.

3. At execution time, object code generated from

.$BREAK

directives is executed at the

point in which it appears in the block. If no condition is specified on the

.$BREAK

condition, or if the condition is true, the

.$REPEAT

loop is exited.

4. At execution time, object code generated from

.$CONTINUE

directives is executed at

the point in which it appears in the block. If no condition is specified on the

.$CON-

TINUE

condition, or if the condition is true, execution of code generated from state-

ments in the block resumes at the beginning of the block.

.$WHILE Sequence of Operations

The following sequence of operations is performed in processing the

.$WHILE

structured

assembly test directives:

1. The assembler generates object code to evaluate the conditions specified on the

.$WHILE

directive and on any optional

.$BREAK

and

.$CONTINUE

directives.

2. At execution time, the object code generated from statements in the structured assem-

bly block are executed while the specified condition is true.

3. At execution time, object code generated from

.$BREAK

directives is executed at the

point in which it appears in the block. If no condition is specified on the

.$BREAK

condition or if the condition is true, the

.$WHILE

loop is exited.

4. At execution time, object code generated from

.$CONTINUE

directives is executed at

the point in which it appears in the block. If no condition is specified on the

.$CON-

TINUE

condition or if the condition is true, execution of code generated from state-

ments in the block resumes at the beginning of the block.

Conditional Assembly

Conditional assembly is used to control the assembly of blocks of code. Entire blocks of
code can be enabled or disabled using conditional assembly directives.

The following conditional assembly directives are allowed:

IF

– see page 326

IFDEF

– see page 327

Advertising