Asm68K Macros; User-Defined Macros; Macro Definition - Texas Instruments TI-89 Software Manual

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

Advertisement

Section 3: Assembler
3.8.

Asm68k Macros

The assembler asm68k supports two macro facilities: user-defined macros and
structured control macros. They are provided to simplify the task of
programming, improve the readability of assembly source, and help reduce the
frequency of errors. This section describes the user-defined macro and
structured control macro support.
3.8.1.

User-Defined Macros

Macros provide an efficient means of generating commonly used sequences of
code. A macro is defined once and can be used any number of times.
Parameters can be used to allow variations in the code sequences generated by
a single macro.
Using macros simplifies programming, since changes can be isolated to a single
location. Also, assembly programs written using macros are more concise and
easier to understand. The remainder of this section describes how to define and
invoke macros, as well as how to use macro parameters and conditional control.
3.8.1.1.

Macro Definition

A macro definition consists of a header, a body, and a terminator. Following is
the syntax for a macro definition:
Syntax
label MACRO [ comment ]
[ statement ]
ENDM
Description
label
comment
statement
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
.
.
.
Specifies the name of the macro. The first 32 characters of the
macro name are significant. Only the first character of the name
can be a period ( . ).
Specifies a comment, which is typically used to document any
formal parameters of the macro.
Specifies an assembler statement. It cannot be a macro definition
(i.e., macro definitions cannot be nested).
Not for Distribution
271
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