Table of Contents

Advertisement

6.4 Source Forms

The glossary pages provide only essential information about assembler source forms.
Assemblers generally support a number of assembler directives, allow definition of
program labels, and have special conventions for comments. For complete informa-
tion about writing source files for a particular assembler, refer to the documentation
provided by the assembler vendor.
Assemblers are typically very flexible about the use of spaces and tabs. Often, any
number of spaces or tabs can be used where a single space is shown on the glossary
pages. Spaces and tabs are also normally allowed before and after commas. When
program labels are used, there must also be at least one tab or space before all in-
struction mnemonics. This required space is not apparent in the source forms.
Everything in the source forms columns, except expressions in italic characters , is lit-
eral information which must appear in the assembly source file exactly as shown. The
initial 3- to 5-letter mnemonic is always a literal expression. All commas, pound signs
(#), parentheses, square brackets ( [ or ] ), plus signs (+), minus signs (–), and the reg-
ister designation D (as in [D,... ), are literal characters.
Groups of italic characters in the columns represent variable information to be sup-
plied by the programmer. These groups can include any alphanumeric character or the
underscore character, but cannot include a space or comma. For example, the groups
xysp and oprx0_xysp are both valid, but the two groups oprx0 xysp are not valid be-
cause there is a space between them. Permitted syntax is described below.
The definition of a legal label or expression varies from assembler to assembler. As-
semblers also vary in the way CPU registers are specified. Refer to assembler docu-
mentation for detailed information. Recommended register designators are a, A, b, B,
ccr, CCR, d, D, x, X, y, Y, sp, SP, pc, and PC.
abc — Any one legal register designator for accumulators A or B or the CCR.
abcdxys — Any one legal register designator for accumulators A or B, the CCR, the double
abd — Any one legal register designator for accumulators A or B or the double accumu-
abdxys — Any one legal register designator for accumulators A or B, the double accumulator
dxys — Any one legal register designation for the double accumulator D, index registers X
msk8 — Any label or expression that evaluates to an 8-bit value. Some assemblers require
opr8i — Any label or expression that evaluates to an 8-bit immediate value.
opr16i — Any label or expression that evaluates to a 16-bit immediate value.
opr8a — Any label or expression that evaluates to an 8-bit value. The instruction treats this
CPU12
REFERENCE MANUAL
accumulator D, index registers X or Y, or the SP. Some assemblers may accept
t2, T2, t3, or T3 codes in certain cases of transfer and exchange instructions, but
these forms are intended for Motorola use only.
lator D.
D, index register X or Y, or the SP.
or Y, or the SP.
a # symbol before this value.
8-bit value as the low order 8-bits of an address in the direct page of the 64-Kbyte
address space ($00xx).
INSTRUCTION GLOSSARY
MOTOROLA
6-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents