Section 3: Assembler
147
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
A single quote (
'
) is represented by a pair of single quotes (
'
'
) when using
asm68k, and by an escaped single quote (
\'
) when using asm68.
Furthermore, if the .opt (not OPT) directive is used in a file assembled by
asm68k, escaped characters are allowed in a character constant appearing in
the effective address field of an instruction. The behavior switch based on the
detection of the .opt directive is needed to allow compiler generated assembly
code to be assembled by asm68k. The escaped characters recognized by
asm68 (and asm68k in the presence of the .opt directive or in an asm68 style
data directive) are shown in Table 3.7.
Syntax
Description
\a
bell (alert)
\b
backspace
\f
form feed
\n
newline
\r
carriage return
\t
tab
\v
vertical tab
\x
h
hexadecimal constant (
h is at most 3 hexadecimal digits)
\X
h
hexadecimal constant (
h is at most 3 hexadecimal digits)
\
o
octal constant (
o is at most 3 octal digits)
\^
c
<ctrl>-
c (c is an alphabetical character)
\
c
c (c is any character excluding escaped characters shown here)
Table 3.7: Escaped Characters
When a character constant is used with the DC directive (asm68k), it is legal to
exceed the character limit. It has the following effect:
DC.B
'abc'
; equivalent to DC.B 'a','b','c'
DC.W
'abc'
; equivalent to DC.W 'ab','c'
When a character constant is used with the .byte or .ascii directive, it is legal to
exceed the character limit by specifying the constant as a string. Strings are
delimited by double quotes (
"
). It has the following effect:
.byte "xyz"
; equivalent to .byte 'x','y','z'
Strings are not null terminated (whereas they are in the C language).