Macro Invocation; Structured Control Reference - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

280
3.8.2.2.

Macro Invocation

The structured control constructs are specified with a set of predefined macros,
which are shown in Table 3.31. Each of these macros and their associated
parameters expand into the appropriate labels and instructions to produce the
desired control structure. These expansions will appear in the listing file if the
OPT SCEX directive is specified (default: OPT NOSCEX). An alphabetically
arranged set of macro descriptions is provided below. Structured control macros
can be nested to form more complicated control structures.
Mnemonic
BREAK
CONTINUE
FOR . . . ENDF
IF . . . ELSE . . . ENDI
REPEAT . . . UNTIL
WHILE . . . ENDW
Table 3.31: Structured Control Macros
In addition to the macro mnemonics, there is a set of supporting keywords, which
are not reserved; they are AND, BY, DO, DOWNTO, OR, THEN, and TO. These
keywords are required syntax for macro invocations, but can be used elsewhere
as ordinary symbols.
As with user-defined macros, invocations of structured control macros can be
continued on additional lines, if necessary. Because of the syntax, no
continuation characters are needed; however, blank lines cannot appear
between any of the continuation lines. Comments used prior to a continuation
line must begin with an exclamation point ( ! ).
Note: The labels that are created during the expansion of structured control macros have local
3.8.2.3.

Structured Control Reference

The remainder of this section contains detailed descriptions of the various
structured control macros. The descriptions are ordered alphabetically.
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
Function
Terminate Loop Execution
Begin Next Loop Iteration
Loop Based on Counter
Perform Conditional Execution
Loop Until Condition True
Loop While Condition True
scope. They are defined using the same mechanism that is used for labels local to
user-defined macros (see section 3.8.1.4 Local Labels). The labels are named ZL1\@,
ZL2\@, ZL3\@, and ZL4\@; the \@ designator is replaced by a period ( . ) and a unique
four-digit number. These labels are treated the same as compiler local labels as far as
the symbol tables in the object and listing files are concerned (i.e., their presence or
absence is controlled with the -S and -s command line flags).
Section 3: Assembler
Not for Distribution
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents