1*a9fa9459Szrj@c Copyright (C) 2000-2016 Free Software Foundation, Inc. 2*a9fa9459Szrj@c This is part of the GAS manual. 3*a9fa9459Szrj@c For copying conditions, see the file as.texinfo. 4*a9fa9459Szrj@c TI TMS320C54X description by Timothy Wall, twall@cygnus.com 5*a9fa9459Szrj@ifset GENERIC 6*a9fa9459Szrj@page 7*a9fa9459Szrj@node TIC54X-Dependent 8*a9fa9459Szrj@chapter TIC54X Dependent Features 9*a9fa9459Szrj@end ifset 10*a9fa9459Szrj@ifclear GENERIC 11*a9fa9459Szrj@node Machine Dependencies 12*a9fa9459Szrj@chapter TIC54X Dependent Features 13*a9fa9459Szrj@end ifclear 14*a9fa9459Szrj 15*a9fa9459Szrj@cindex TIC54X support 16*a9fa9459Szrj@menu 17*a9fa9459Szrj* TIC54X-Opts:: Command-line Options 18*a9fa9459Szrj* TIC54X-Block:: Blocking 19*a9fa9459Szrj* TIC54X-Env:: Environment Settings 20*a9fa9459Szrj* TIC54X-Constants:: Constants Syntax 21*a9fa9459Szrj* TIC54X-Subsyms:: String Substitution 22*a9fa9459Szrj* TIC54X-Locals:: Local Label Syntax 23*a9fa9459Szrj* TIC54X-Builtins:: Builtin Assembler Math Functions 24*a9fa9459Szrj* TIC54X-Ext:: Extended Addressing Support 25*a9fa9459Szrj* TIC54X-Directives:: Directives 26*a9fa9459Szrj* TIC54X-Macros:: Macro Features 27*a9fa9459Szrj* TIC54X-MMRegs:: Memory-mapped Registers 28*a9fa9459Szrj* TIC54X-Syntax:: Syntax 29*a9fa9459Szrj@end menu 30*a9fa9459Szrj 31*a9fa9459Szrj@node TIC54X-Opts 32*a9fa9459Szrj@section Options 33*a9fa9459Szrj 34*a9fa9459Szrj@cindex options, TIC54X 35*a9fa9459Szrj@cindex TIC54X options 36*a9fa9459SzrjThe TMS320C54X version of @code{@value{AS}} has a few machine-dependent options. 37*a9fa9459Szrj 38*a9fa9459Szrj@cindex @samp{-mfar-mode} option, far-mode 39*a9fa9459Szrj@cindex @samp{-mf} option, far-mode 40*a9fa9459SzrjYou can use the @samp{-mfar-mode} option to enable extended addressing mode. 41*a9fa9459SzrjAll addresses will be assumed to be > 16 bits, and the appropriate 42*a9fa9459Szrjrelocation types will be used. This option is equivalent to using the 43*a9fa9459Szrj@samp{.far_mode} directive in the assembly code. If you do not use the 44*a9fa9459Szrj@samp{-mfar-mode} option, all references will be assumed to be 16 bits. 45*a9fa9459SzrjThis option may be abbreviated to @samp{-mf}. 46*a9fa9459Szrj 47*a9fa9459Szrj@cindex @samp{-mcpu} option, cpu 48*a9fa9459SzrjYou can use the @samp{-mcpu} option to specify a particular CPU. 49*a9fa9459SzrjThis option is equivalent to using the @samp{.version} directive in the 50*a9fa9459Szrjassembly code. For recognized CPU codes, see 51*a9fa9459Szrj@xref{TIC54X-Directives,,@code{.version}}. The default CPU version is 52*a9fa9459Szrj@samp{542}. 53*a9fa9459Szrj 54*a9fa9459Szrj@cindex @samp{-merrors-to-file} option, stderr redirect 55*a9fa9459Szrj@cindex @samp{-me} option, stderr redirect 56*a9fa9459SzrjYou can use the @samp{-merrors-to-file} option to redirect error output 57*a9fa9459Szrjto a file (this provided for those deficient environments which don't 58*a9fa9459Szrjprovide adequate output redirection). This option may be abbreviated to 59*a9fa9459Szrj@samp{-me}. 60*a9fa9459Szrj 61*a9fa9459Szrj@node TIC54X-Block 62*a9fa9459Szrj@section Blocking 63*a9fa9459SzrjA blocked section or memory block is guaranteed not to cross the blocking 64*a9fa9459Szrjboundary (usually a page, or 128 words) if it is smaller than the 65*a9fa9459Szrjblocking size, or to start on a page boundary if it is larger than the 66*a9fa9459Szrjblocking size. 67*a9fa9459Szrj 68*a9fa9459Szrj@node TIC54X-Env 69*a9fa9459Szrj@section Environment Settings 70*a9fa9459Szrj 71*a9fa9459Szrj@cindex environment settings, TIC54X 72*a9fa9459Szrj@cindex @samp{A_DIR} environment variable, TIC54X 73*a9fa9459Szrj@cindex @samp{C54XDSP_DIR} environment variable, TIC54X 74*a9fa9459Szrj@samp{C54XDSP_DIR} and @samp{A_DIR} are semicolon-separated 75*a9fa9459Szrjpaths which are added to the list of directories normally searched for 76*a9fa9459Szrjsource and include files. @samp{C54XDSP_DIR} will override @samp{A_DIR}. 77*a9fa9459Szrj 78*a9fa9459Szrj@node TIC54X-Constants 79*a9fa9459Szrj@section Constants Syntax 80*a9fa9459Szrj 81*a9fa9459Szrj@cindex constants, TIC54X 82*a9fa9459SzrjThe TIC54X version of @code{@value{AS}} allows the following additional 83*a9fa9459Szrjconstant formats, using a suffix to indicate the radix: 84*a9fa9459Szrj@smallexample 85*a9fa9459Szrj@cindex binary constants, TIC54X 86*a9fa9459Szrj 87*a9fa9459SzrjBinary @code{000000B, 011000b} 88*a9fa9459SzrjOctal @code{10Q, 224q} 89*a9fa9459SzrjHexadecimal @code{45h, 0FH} 90*a9fa9459Szrj 91*a9fa9459Szrj@end smallexample 92*a9fa9459Szrj 93*a9fa9459Szrj@node TIC54X-Subsyms 94*a9fa9459Szrj@section String Substitution 95*a9fa9459SzrjA subset of allowable symbols (which we'll call subsyms) may be assigned 96*a9fa9459Szrjarbitrary string values. This is roughly equivalent to C preprocessor 97*a9fa9459Szrj#define macros. When @code{@value{AS}} encounters one of these 98*a9fa9459Szrjsymbols, the symbol is replaced in the input stream by its string value. 99*a9fa9459SzrjSubsym names @strong{must} begin with a letter. 100*a9fa9459Szrj 101*a9fa9459SzrjSubsyms may be defined using the @code{.asg} and @code{.eval} directives 102*a9fa9459Szrj(@xref{TIC54X-Directives,,@code{.asg}}, 103*a9fa9459Szrj@xref{TIC54X-Directives,,@code{.eval}}. 104*a9fa9459Szrj 105*a9fa9459SzrjExpansion is recursive until a previously encountered symbol is seen, at 106*a9fa9459Szrjwhich point substitution stops. 107*a9fa9459Szrj 108*a9fa9459SzrjIn this example, x is replaced with SYM2; SYM2 is replaced with SYM1, and SYM1 109*a9fa9459Szrjis replaced with x. At this point, x has already been encountered 110*a9fa9459Szrjand the substitution stops. 111*a9fa9459Szrj 112*a9fa9459Szrj@smallexample 113*a9fa9459Szrj .asg "x",SYM1 114*a9fa9459Szrj .asg "SYM1",SYM2 115*a9fa9459Szrj .asg "SYM2",x 116*a9fa9459Szrj add x,a ; final code assembled is "add x, a" 117*a9fa9459Szrj@end smallexample 118*a9fa9459Szrj 119*a9fa9459SzrjMacro parameters are converted to subsyms; a side effect of this is the normal 120*a9fa9459Szrj@code{@value{AS}} '\ARG' dereferencing syntax is unnecessary. Subsyms 121*a9fa9459Szrjdefined within a macro will have global scope, unless the @code{.var} 122*a9fa9459Szrjdirective is used to identify the subsym as a local macro variable 123*a9fa9459Szrj@pxref{TIC54X-Directives,,@code{.var}}. 124*a9fa9459Szrj 125*a9fa9459SzrjSubstitution may be forced in situations where replacement might be 126*a9fa9459Szrjambiguous by placing colons on either side of the subsym. The following 127*a9fa9459Szrjcode: 128*a9fa9459Szrj 129*a9fa9459Szrj@smallexample 130*a9fa9459Szrj .eval "10",x 131*a9fa9459SzrjLAB:X: add #x, a 132*a9fa9459Szrj@end smallexample 133*a9fa9459Szrj 134*a9fa9459SzrjWhen assembled becomes: 135*a9fa9459Szrj 136*a9fa9459Szrj@smallexample 137*a9fa9459SzrjLAB10 add #10, a 138*a9fa9459Szrj@end smallexample 139*a9fa9459Szrj 140*a9fa9459SzrjSmaller parts of the string assigned to a subsym may be accessed with 141*a9fa9459Szrjthe following syntax: 142*a9fa9459Szrj 143*a9fa9459Szrj@table @code 144*a9fa9459Szrj@item @code{:@var{symbol}(@var{char_index}):} 145*a9fa9459SzrjEvaluates to a single-character string, the character at @var{char_index}. 146*a9fa9459Szrj@item @code{:@var{symbol}(@var{start},@var{length}):} 147*a9fa9459SzrjEvaluates to a substring of @var{symbol} beginning at @var{start} with 148*a9fa9459Szrjlength @var{length}. 149*a9fa9459Szrj@end table 150*a9fa9459Szrj 151*a9fa9459Szrj@node TIC54X-Locals 152*a9fa9459Szrj@section Local Labels 153*a9fa9459SzrjLocal labels may be defined in two ways: 154*a9fa9459Szrj 155*a9fa9459Szrj@itemize @bullet 156*a9fa9459Szrj@item 157*a9fa9459Szrj$N, where N is a decimal number between 0 and 9 158*a9fa9459Szrj@item 159*a9fa9459SzrjLABEL?, where LABEL is any legal symbol name. 160*a9fa9459Szrj@end itemize 161*a9fa9459Szrj 162*a9fa9459SzrjLocal labels thus defined may be redefined or automatically generated. 163*a9fa9459SzrjThe scope of a local label is based on when it may be undefined or reset. 164*a9fa9459SzrjThis happens when one of the following situations is encountered: 165*a9fa9459Szrj 166*a9fa9459Szrj@itemize @bullet 167*a9fa9459Szrj@item 168*a9fa9459Szrj.newblock directive @pxref{TIC54X-Directives,,@code{.newblock}} 169*a9fa9459Szrj@item 170*a9fa9459SzrjThe current section is changed (.sect, .text, or .data) 171*a9fa9459Szrj@item 172*a9fa9459SzrjEntering or leaving an included file 173*a9fa9459Szrj@item 174*a9fa9459SzrjThe macro scope where the label was defined is exited 175*a9fa9459Szrj@end itemize 176*a9fa9459Szrj 177*a9fa9459Szrj@node TIC54X-Builtins 178*a9fa9459Szrj@section Math Builtins 179*a9fa9459Szrj 180*a9fa9459Szrj@cindex math builtins, TIC54X 181*a9fa9459Szrj@cindex TIC54X builtin math functions 182*a9fa9459Szrj@cindex builtin math functions, TIC54X 183*a9fa9459Szrj 184*a9fa9459SzrjThe following built-in functions may be used to generate a 185*a9fa9459Szrjfloating-point value. All return a floating-point value except 186*a9fa9459Szrj@samp{$cvi}, @samp{$int}, and @samp{$sgn}, which return an integer 187*a9fa9459Szrjvalue. 188*a9fa9459Szrj 189*a9fa9459Szrj@table @code 190*a9fa9459Szrj@cindex @code{$acos} math builtin, TIC54X 191*a9fa9459Szrj@item @code{$acos(@var{expr})} 192*a9fa9459SzrjReturns the floating point arccosine of @var{expr}. 193*a9fa9459Szrj 194*a9fa9459Szrj@cindex @code{$asin} math builtin, TIC54X 195*a9fa9459Szrj@item @code{$asin(@var{expr})} 196*a9fa9459SzrjReturns the floating point arcsine of @var{expr}. 197*a9fa9459Szrj 198*a9fa9459Szrj@cindex @code{$atan} math builtin, TIC54X 199*a9fa9459Szrj@item @code{$atan(@var{expr})} 200*a9fa9459SzrjReturns the floating point arctangent of @var{expr}. 201*a9fa9459Szrj 202*a9fa9459Szrj@cindex @code{$atan2} math builtin, TIC54X 203*a9fa9459Szrj@item @code{$atan2(@var{expr1},@var{expr2})} 204*a9fa9459SzrjReturns the floating point arctangent of @var{expr1} / @var{expr2}. 205*a9fa9459Szrj 206*a9fa9459Szrj@cindex @code{$ceil} math builtin, TIC54X 207*a9fa9459Szrj@item @code{$ceil(@var{expr})} 208*a9fa9459SzrjReturns the smallest integer not less than @var{expr} as floating point. 209*a9fa9459Szrj 210*a9fa9459Szrj@cindex @code{$cosh} math builtin, TIC54X 211*a9fa9459Szrj@item @code{$cosh(@var{expr})} 212*a9fa9459SzrjReturns the floating point hyperbolic cosine of @var{expr}. 213*a9fa9459Szrj 214*a9fa9459Szrj@cindex @code{$cos} math builtin, TIC54X 215*a9fa9459Szrj@item @code{$cos(@var{expr})} 216*a9fa9459SzrjReturns the floating point cosine of @var{expr}. 217*a9fa9459Szrj 218*a9fa9459Szrj@cindex @code{$cvf} math builtin, TIC54X 219*a9fa9459Szrj@item @code{$cvf(@var{expr})} 220*a9fa9459SzrjReturns the integer value @var{expr} converted to floating-point. 221*a9fa9459Szrj 222*a9fa9459Szrj@cindex @code{$cvi} math builtin, TIC54X 223*a9fa9459Szrj@item @code{$cvi(@var{expr})} 224*a9fa9459SzrjReturns the floating point value @var{expr} converted to integer. 225*a9fa9459Szrj 226*a9fa9459Szrj@cindex @code{$exp} math builtin, TIC54X 227*a9fa9459Szrj@item @code{$exp(@var{expr})} 228*a9fa9459SzrjReturns the floating point value e ^ @var{expr}. 229*a9fa9459Szrj 230*a9fa9459Szrj@cindex @code{$fabs} math builtin, TIC54X 231*a9fa9459Szrj@item @code{$fabs(@var{expr})} 232*a9fa9459SzrjReturns the floating point absolute value of @var{expr}. 233*a9fa9459Szrj 234*a9fa9459Szrj@cindex @code{$floor} math builtin, TIC54X 235*a9fa9459Szrj@item @code{$floor(@var{expr})} 236*a9fa9459SzrjReturns the largest integer that is not greater than @var{expr} as 237*a9fa9459Szrjfloating point. 238*a9fa9459Szrj 239*a9fa9459Szrj@cindex @code{$fmod} math builtin, TIC54X 240*a9fa9459Szrj@item @code{$fmod(@var{expr1},@var{expr2})} 241*a9fa9459SzrjReturns the floating point remainder of @var{expr1} / @var{expr2}. 242*a9fa9459Szrj 243*a9fa9459Szrj@cindex @code{$int} math builtin, TIC54X 244*a9fa9459Szrj@item @code{$int(@var{expr})} 245*a9fa9459SzrjReturns 1 if @var{expr} evaluates to an integer, zero otherwise. 246*a9fa9459Szrj 247*a9fa9459Szrj@cindex @code{$ldexp} math builtin, TIC54X 248*a9fa9459Szrj@item @code{$ldexp(@var{expr1},@var{expr2})} 249*a9fa9459SzrjReturns the floating point value @var{expr1} * 2 ^ @var{expr2}. 250*a9fa9459Szrj 251*a9fa9459Szrj@cindex @code{$log10} math builtin, TIC54X 252*a9fa9459Szrj@item @code{$log10(@var{expr})} 253*a9fa9459SzrjReturns the base 10 logarithm of @var{expr}. 254*a9fa9459Szrj 255*a9fa9459Szrj@cindex @code{$log} math builtin, TIC54X 256*a9fa9459Szrj@item @code{$log(@var{expr})} 257*a9fa9459SzrjReturns the natural logarithm of @var{expr}. 258*a9fa9459Szrj 259*a9fa9459Szrj@cindex @code{$max} math builtin, TIC54X 260*a9fa9459Szrj@item @code{$max(@var{expr1},@var{expr2})} 261*a9fa9459SzrjReturns the floating point maximum of @var{expr1} and @var{expr2}. 262*a9fa9459Szrj 263*a9fa9459Szrj@cindex @code{$min} math builtin, TIC54X 264*a9fa9459Szrj@item @code{$min(@var{expr1},@var{expr2})} 265*a9fa9459SzrjReturns the floating point minimum of @var{expr1} and @var{expr2}. 266*a9fa9459Szrj 267*a9fa9459Szrj@cindex @code{$pow} math builtin, TIC54X 268*a9fa9459Szrj@item @code{$pow(@var{expr1},@var{expr2})} 269*a9fa9459SzrjReturns the floating point value @var{expr1} ^ @var{expr2}. 270*a9fa9459Szrj 271*a9fa9459Szrj@cindex @code{$round} math builtin, TIC54X 272*a9fa9459Szrj@item @code{$round(@var{expr})} 273*a9fa9459SzrjReturns the nearest integer to @var{expr} as a floating point number. 274*a9fa9459Szrj 275*a9fa9459Szrj@cindex @code{$sgn} math builtin, TIC54X 276*a9fa9459Szrj@item @code{$sgn(@var{expr})} 277*a9fa9459SzrjReturns -1, 0, or 1 based on the sign of @var{expr}. 278*a9fa9459Szrj 279*a9fa9459Szrj@cindex @code{$sin} math builtin, TIC54X 280*a9fa9459Szrj@item @code{$sin(@var{expr})} 281*a9fa9459SzrjReturns the floating point sine of @var{expr}. 282*a9fa9459Szrj 283*a9fa9459Szrj@cindex @code{$sinh} math builtin, TIC54X 284*a9fa9459Szrj@item @code{$sinh(@var{expr})} 285*a9fa9459SzrjReturns the floating point hyperbolic sine of @var{expr}. 286*a9fa9459Szrj 287*a9fa9459Szrj@cindex @code{$sqrt} math builtin, TIC54X 288*a9fa9459Szrj@item @code{$sqrt(@var{expr})} 289*a9fa9459SzrjReturns the floating point square root of @var{expr}. 290*a9fa9459Szrj 291*a9fa9459Szrj@cindex @code{$tan} math builtin, TIC54X 292*a9fa9459Szrj@item @code{$tan(@var{expr})} 293*a9fa9459SzrjReturns the floating point tangent of @var{expr}. 294*a9fa9459Szrj 295*a9fa9459Szrj@cindex @code{$tanh} math builtin, TIC54X 296*a9fa9459Szrj@item @code{$tanh(@var{expr})} 297*a9fa9459SzrjReturns the floating point hyperbolic tangent of @var{expr}. 298*a9fa9459Szrj 299*a9fa9459Szrj@cindex @code{$trunc} math builtin, TIC54X 300*a9fa9459Szrj@item @code{$trunc(@var{expr})} 301*a9fa9459SzrjReturns the integer value of @var{expr} truncated towards zero as 302*a9fa9459Szrjfloating point. 303*a9fa9459Szrj 304*a9fa9459Szrj@end table 305*a9fa9459Szrj 306*a9fa9459Szrj@node TIC54X-Ext 307*a9fa9459Szrj@section Extended Addressing 308*a9fa9459SzrjThe @code{LDX} pseudo-op is provided for loading the extended addressing bits 309*a9fa9459Szrjof a label or address. For example, if an address @code{_label} resides 310*a9fa9459Szrjin extended program memory, the value of @code{_label} may be loaded as 311*a9fa9459Szrjfollows: 312*a9fa9459Szrj@smallexample 313*a9fa9459Szrj ldx #_label,16,a ; loads extended bits of _label 314*a9fa9459Szrj or #_label,a ; loads lower 16 bits of _label 315*a9fa9459Szrj bacc a ; full address is in accumulator A 316*a9fa9459Szrj@end smallexample 317*a9fa9459Szrj 318*a9fa9459Szrj@node TIC54X-Directives 319*a9fa9459Szrj@section Directives 320*a9fa9459Szrj 321*a9fa9459Szrj@cindex machine directives, TIC54X 322*a9fa9459Szrj@cindex TIC54X machine directives 323*a9fa9459Szrj 324*a9fa9459Szrj@table @code 325*a9fa9459Szrj 326*a9fa9459Szrj@cindex @code{align} directive, TIC54X 327*a9fa9459Szrj@cindex @code{even} directive, TIC54X 328*a9fa9459Szrj@item .align [@var{size}] 329*a9fa9459Szrj@itemx .even 330*a9fa9459SzrjAlign the section program counter on the next boundary, based on 331*a9fa9459Szrj@var{size}. @var{size} may be any power of 2. @code{.even} is 332*a9fa9459Szrjequivalent to @code{.align} with a @var{size} of 2. 333*a9fa9459Szrj@table @code 334*a9fa9459Szrj@item 1 335*a9fa9459SzrjAlign SPC to word boundary 336*a9fa9459Szrj@item 2 337*a9fa9459SzrjAlign SPC to longword boundary (same as .even) 338*a9fa9459Szrj@item 128 339*a9fa9459SzrjAlign SPC to page boundary 340*a9fa9459Szrj@end table 341*a9fa9459Szrj 342*a9fa9459Szrj@cindex @code{asg} directive, TIC54X 343*a9fa9459Szrj@item .asg @var{string}, @var{name} 344*a9fa9459SzrjAssign @var{name} the string @var{string}. String replacement is 345*a9fa9459Szrjperformed on @var{string} before assignment. 346*a9fa9459Szrj 347*a9fa9459Szrj@cindex @code{eval} directive, TIC54X 348*a9fa9459Szrj@item .eval @var{string}, @var{name} 349*a9fa9459SzrjEvaluate the contents of string @var{string} and assign the result as a 350*a9fa9459Szrjstring to the subsym @var{name}. String replacement is performed on 351*a9fa9459Szrj@var{string} before assignment. 352*a9fa9459Szrj 353*a9fa9459Szrj@cindex @code{bss} directive, TIC54X 354*a9fa9459Szrj@item .bss @var{symbol}, @var{size} [, [@var{blocking_flag}] [,@var{alignment_flag}]] 355*a9fa9459SzrjReserve space for @var{symbol} in the .bss section. @var{size} is in 356*a9fa9459Szrjwords. If present, @var{blocking_flag} indicates the allocated space 357*a9fa9459Szrjshould be aligned on a page boundary if it would otherwise cross a page 358*a9fa9459Szrjboundary. If present, @var{alignment_flag} causes the assembler to 359*a9fa9459Szrjallocate @var{size} on a long word boundary. 360*a9fa9459Szrj 361*a9fa9459Szrj@cindex @code{byte} directive, TIC54X 362*a9fa9459Szrj@cindex @code{ubyte} directive, TIC54X 363*a9fa9459Szrj@cindex @code{char} directive, TIC54X 364*a9fa9459Szrj@cindex @code{uchar} directive, TIC54X 365*a9fa9459Szrj@item .byte @var{value} [,...,@var{value_n}] 366*a9fa9459Szrj@itemx .ubyte @var{value} [,...,@var{value_n}] 367*a9fa9459Szrj@itemx .char @var{value} [,...,@var{value_n}] 368*a9fa9459Szrj@itemx .uchar @var{value} [,...,@var{value_n}] 369*a9fa9459SzrjPlace one or more bytes into consecutive words of the current section. 370*a9fa9459SzrjThe upper 8 bits of each word is zero-filled. If a label is used, it 371*a9fa9459Szrjpoints to the word allocated for the first byte encountered. 372*a9fa9459Szrj 373*a9fa9459Szrj@cindex @code{clink} directive, TIC54X 374*a9fa9459Szrj@item .clink ["@var{section_name}"] 375*a9fa9459SzrjSet STYP_CLINK flag for this section, which indicates to the linker that 376*a9fa9459Szrjif no symbols from this section are referenced, the section should not 377*a9fa9459Szrjbe included in the link. If @var{section_name} is omitted, the current 378*a9fa9459Szrjsection is used. 379*a9fa9459Szrj 380*a9fa9459Szrj@cindex @code{c_mode} directive, TIC54X 381*a9fa9459Szrj@item .c_mode 382*a9fa9459SzrjTBD. 383*a9fa9459Szrj 384*a9fa9459Szrj@cindex @code{copy} directive, TIC54X 385*a9fa9459Szrj@item .copy "@var{filename}" | @var{filename} 386*a9fa9459Szrj@itemx .include "@var{filename}" | @var{filename} 387*a9fa9459SzrjRead source statements from @var{filename}. The normal include search 388*a9fa9459Szrjpath is used. Normally .copy will cause statements from the included 389*a9fa9459Szrjfile to be printed in the assembly listing and .include will not, but 390*a9fa9459Szrjthis distinction is not currently implemented. 391*a9fa9459Szrj 392*a9fa9459Szrj@cindex @code{data} directive, TIC54X 393*a9fa9459Szrj@item .data 394*a9fa9459SzrjBegin assembling code into the .data section. 395*a9fa9459Szrj 396*a9fa9459Szrj@cindex @code{double} directive, TIC54X 397*a9fa9459Szrj@cindex @code{ldouble} directive, TIC54X 398*a9fa9459Szrj@cindex @code{float} directive, TIC54X 399*a9fa9459Szrj@cindex @code{xfloat} directive, TIC54X 400*a9fa9459Szrj@item .double @var{value} [,...,@var{value_n}] 401*a9fa9459Szrj@itemx .ldouble @var{value} [,...,@var{value_n}] 402*a9fa9459Szrj@itemx .float @var{value} [,...,@var{value_n}] 403*a9fa9459Szrj@itemx .xfloat @var{value} [,...,@var{value_n}] 404*a9fa9459SzrjPlace an IEEE single-precision floating-point representation of one or 405*a9fa9459Szrjmore floating-point values into the current section. All but 406*a9fa9459Szrj@code{.xfloat} align the result on a longword boundary. Values are 407*a9fa9459Szrjstored most-significant word first. 408*a9fa9459Szrj 409*a9fa9459Szrj@cindex @code{drlist} directive, TIC54X 410*a9fa9459Szrj@cindex @code{drnolist} directive, TIC54X 411*a9fa9459Szrj@item .drlist 412*a9fa9459Szrj@itemx .drnolist 413*a9fa9459SzrjControl printing of directives to the listing file. Ignored. 414*a9fa9459Szrj 415*a9fa9459Szrj@cindex @code{emsg} directive, TIC54X 416*a9fa9459Szrj@cindex @code{mmsg} directive, TIC54X 417*a9fa9459Szrj@cindex @code{wmsg} directive, TIC54X 418*a9fa9459Szrj@item .emsg @var{string} 419*a9fa9459Szrj@itemx .mmsg @var{string} 420*a9fa9459Szrj@itemx .wmsg @var{string} 421*a9fa9459SzrjEmit a user-defined error, message, or warning, respectively. 422*a9fa9459Szrj 423*a9fa9459Szrj@cindex @code{far_mode} directive, TIC54X 424*a9fa9459Szrj@item .far_mode 425*a9fa9459SzrjUse extended addressing when assembling statements. This should appear 426*a9fa9459Szrjonly once per file, and is equivalent to the -mfar-mode option @pxref{TIC54X-Opts,,@code{-mfar-mode}}. 427*a9fa9459Szrj 428*a9fa9459Szrj@cindex @code{fclist} directive, TIC54X 429*a9fa9459Szrj@cindex @code{fcnolist} directive, TIC54X 430*a9fa9459Szrj@item .fclist 431*a9fa9459Szrj@itemx .fcnolist 432*a9fa9459SzrjControl printing of false conditional blocks to the listing file. 433*a9fa9459Szrj 434*a9fa9459Szrj@cindex @code{field} directive, TIC54X 435*a9fa9459Szrj@item .field @var{value} [,@var{size}] 436*a9fa9459SzrjInitialize a bitfield of @var{size} bits in the current section. If 437*a9fa9459Szrj@var{value} is relocatable, then @var{size} must be 16. @var{size} 438*a9fa9459Szrjdefaults to 16 bits. If @var{value} does not fit into @var{size} bits, 439*a9fa9459Szrjthe value will be truncated. Successive @code{.field} directives will 440*a9fa9459Szrjpack starting at the current word, filling the most significant bits 441*a9fa9459Szrjfirst, and aligning to the start of the next word if the field size does 442*a9fa9459Szrjnot fit into the space remaining in the current word. A @code{.align} 443*a9fa9459Szrjdirective with an operand of 1 will force the next @code{.field} 444*a9fa9459Szrjdirective to begin packing into a new word. If a label is used, it 445*a9fa9459Szrjpoints to the word that contains the specified field. 446*a9fa9459Szrj 447*a9fa9459Szrj@cindex @code{global} directive, TIC54X 448*a9fa9459Szrj@cindex @code{def} directive, TIC54X 449*a9fa9459Szrj@cindex @code{ref} directive, TIC54X 450*a9fa9459Szrj@item .global @var{symbol} [,...,@var{symbol_n}] 451*a9fa9459Szrj@itemx .def @var{symbol} [,...,@var{symbol_n}] 452*a9fa9459Szrj@itemx .ref @var{symbol} [,...,@var{symbol_n}] 453*a9fa9459Szrj@code{.def} nominally identifies a symbol defined in the current file 454*a9fa9459Szrjand available to other files. @code{.ref} identifies a symbol used in 455*a9fa9459Szrjthe current file but defined elsewhere. Both map to the standard 456*a9fa9459Szrj@code{.global} directive. 457*a9fa9459Szrj 458*a9fa9459Szrj@cindex @code{half} directive, TIC54X 459*a9fa9459Szrj@cindex @code{uhalf} directive, TIC54X 460*a9fa9459Szrj@cindex @code{short} directive, TIC54X 461*a9fa9459Szrj@cindex @code{ushort} directive, TIC54X 462*a9fa9459Szrj@cindex @code{int} directive, TIC54X 463*a9fa9459Szrj@cindex @code{uint} directive, TIC54X 464*a9fa9459Szrj@cindex @code{word} directive, TIC54X 465*a9fa9459Szrj@cindex @code{uword} directive, TIC54X 466*a9fa9459Szrj@item .half @var{value} [,...,@var{value_n}] 467*a9fa9459Szrj@itemx .uhalf @var{value} [,...,@var{value_n}] 468*a9fa9459Szrj@itemx .short @var{value} [,...,@var{value_n}] 469*a9fa9459Szrj@itemx .ushort @var{value} [,...,@var{value_n}] 470*a9fa9459Szrj@itemx .int @var{value} [,...,@var{value_n}] 471*a9fa9459Szrj@itemx .uint @var{value} [,...,@var{value_n}] 472*a9fa9459Szrj@itemx .word @var{value} [,...,@var{value_n}] 473*a9fa9459Szrj@itemx .uword @var{value} [,...,@var{value_n}] 474*a9fa9459SzrjPlace one or more values into consecutive words of the current section. 475*a9fa9459SzrjIf a label is used, it points to the word allocated for the first value 476*a9fa9459Szrjencountered. 477*a9fa9459Szrj 478*a9fa9459Szrj@cindex @code{label} directive, TIC54X 479*a9fa9459Szrj@item .label @var{symbol} 480*a9fa9459SzrjDefine a special @var{symbol} to refer to the load time address of the 481*a9fa9459Szrjcurrent section program counter. 482*a9fa9459Szrj 483*a9fa9459Szrj@cindex @code{length} directive, TIC54X 484*a9fa9459Szrj@cindex @code{width} directive, TIC54X 485*a9fa9459Szrj@item .length 486*a9fa9459Szrj@itemx .width 487*a9fa9459SzrjSet the page length and width of the output listing file. Ignored. 488*a9fa9459Szrj 489*a9fa9459Szrj@cindex @code{list} directive, TIC54X 490*a9fa9459Szrj@cindex @code{nolist} directive, TIC54X 491*a9fa9459Szrj@item .list 492*a9fa9459Szrj@itemx .nolist 493*a9fa9459SzrjControl whether the source listing is printed. Ignored. 494*a9fa9459Szrj 495*a9fa9459Szrj@cindex @code{long} directive, TIC54X 496*a9fa9459Szrj@cindex @code{ulong} directive, TIC54X 497*a9fa9459Szrj@cindex @code{xlong} directive, TIC54X 498*a9fa9459Szrj@item .long @var{value} [,...,@var{value_n}] 499*a9fa9459Szrj@itemx .ulong @var{value} [,...,@var{value_n}] 500*a9fa9459Szrj@itemx .xlong @var{value} [,...,@var{value_n}] 501*a9fa9459SzrjPlace one or more 32-bit values into consecutive words in the current 502*a9fa9459Szrjsection. The most significant word is stored first. @code{.long} and 503*a9fa9459Szrj@code{.ulong} align the result on a longword boundary; @code{xlong} does 504*a9fa9459Szrjnot. 505*a9fa9459Szrj 506*a9fa9459Szrj@cindex @code{loop} directive, TIC54X 507*a9fa9459Szrj@cindex @code{break} directive, TIC54X 508*a9fa9459Szrj@cindex @code{endloop} directive, TIC54X 509*a9fa9459Szrj@item .loop [@var{count}] 510*a9fa9459Szrj@itemx .break [@var{condition}] 511*a9fa9459Szrj@itemx .endloop 512*a9fa9459SzrjRepeatedly assemble a block of code. @code{.loop} begins the block, and 513*a9fa9459Szrj@code{.endloop} marks its termination. @var{count} defaults to 1024, 514*a9fa9459Szrjand indicates the number of times the block should be repeated. 515*a9fa9459Szrj@code{.break} terminates the loop so that assembly begins after the 516*a9fa9459Szrj@code{.endloop} directive. The optional @var{condition} will cause the 517*a9fa9459Szrjloop to terminate only if it evaluates to zero. 518*a9fa9459Szrj 519*a9fa9459Szrj@cindex @code{macro} directive, TIC54X 520*a9fa9459Szrj@cindex @code{endm} directive, TIC54X 521*a9fa9459Szrj@item @var{macro_name} .macro [@var{param1}][,...@var{param_n}] 522*a9fa9459Szrj@itemx [.mexit] 523*a9fa9459Szrj@itemx .endm 524*a9fa9459SzrjSee the section on macros for more explanation (@xref{TIC54X-Macros}. 525*a9fa9459Szrj 526*a9fa9459Szrj@cindex @code{mlib} directive, TIC54X 527*a9fa9459Szrj@item .mlib "@var{filename}" | @var{filename} 528*a9fa9459SzrjLoad the macro library @var{filename}. @var{filename} must be an 529*a9fa9459Szrjarchived library (BFD ar-compatible) of text files, expected to contain 530*a9fa9459Szrjonly macro definitions. The standard include search path is used. 531*a9fa9459Szrj 532*a9fa9459Szrj@cindex @code{mlist} directive, TIC54X 533*a9fa9459Szrj@cindex @code{mnolist} directive, TIC54X 534*a9fa9459Szrj@item .mlist 535*a9fa9459Szrj@itemx .mnolist 536*a9fa9459SzrjControl whether to include macro and loop block expansions in the 537*a9fa9459Szrjlisting output. Ignored. 538*a9fa9459Szrj 539*a9fa9459Szrj@cindex @code{mmregs} directive, TIC54X 540*a9fa9459Szrj@item .mmregs 541*a9fa9459SzrjDefine global symbolic names for the 'c54x registers. Supposedly 542*a9fa9459Szrjequivalent to executing @code{.set} directives for each register with 543*a9fa9459Szrjits memory-mapped value, but in reality is provided only for 544*a9fa9459Szrjcompatibility and does nothing. 545*a9fa9459Szrj 546*a9fa9459Szrj@cindex @code{newblock} directive, TIC54X 547*a9fa9459Szrj@item .newblock 548*a9fa9459SzrjThis directive resets any TIC54X local labels currently defined. Normal 549*a9fa9459Szrj@code{@value{AS}} local labels are unaffected. 550*a9fa9459Szrj 551*a9fa9459Szrj@cindex @code{option} directive, TIC54X 552*a9fa9459Szrj@item .option @var{option_list} 553*a9fa9459SzrjSet listing options. Ignored. 554*a9fa9459Szrj 555*a9fa9459Szrj@cindex @code{sblock} directive, TIC54X 556*a9fa9459Szrj@item .sblock "@var{section_name}" | @var{section_name} [,"@var{name_n}" | @var{name_n}] 557*a9fa9459SzrjDesignate @var{section_name} for blocking. Blocking guarantees that a 558*a9fa9459Szrjsection will start on a page boundary (128 words) if it would otherwise 559*a9fa9459Szrjcross a page boundary. Only initialized sections may be designated with 560*a9fa9459Szrjthis directive. See also @xref{TIC54X-Block}. 561*a9fa9459Szrj 562*a9fa9459Szrj@cindex @code{sect} directive, TIC54X 563*a9fa9459Szrj@item .sect "@var{section_name}" 564*a9fa9459SzrjDefine a named initialized section and make it the current section. 565*a9fa9459Szrj 566*a9fa9459Szrj@cindex @code{set} directive, TIC54X 567*a9fa9459Szrj@cindex @code{equ} directive, TIC54X 568*a9fa9459Szrj@item @var{symbol} .set "@var{value}" 569*a9fa9459Szrj@itemx @var{symbol} .equ "@var{value}" 570*a9fa9459SzrjEquate a constant @var{value} to a @var{symbol}, which is placed in the 571*a9fa9459Szrjsymbol table. @var{symbol} may not be previously defined. 572*a9fa9459Szrj 573*a9fa9459Szrj@cindex @code{space} directive, TIC54X 574*a9fa9459Szrj@cindex @code{bes} directive, TIC54X 575*a9fa9459Szrj@item .space @var{size_in_bits} 576*a9fa9459Szrj@itemx .bes @var{size_in_bits} 577*a9fa9459SzrjReserve the given number of bits in the current section and zero-fill 578*a9fa9459Szrjthem. If a label is used with @code{.space}, it points to the 579*a9fa9459Szrj@strong{first} word reserved. With @code{.bes}, the label points to the 580*a9fa9459Szrj@strong{last} word reserved. 581*a9fa9459Szrj 582*a9fa9459Szrj@cindex @code{sslist} directive, TIC54X 583*a9fa9459Szrj@cindex @code{ssnolist} directive, TIC54X 584*a9fa9459Szrj@item .sslist 585*a9fa9459Szrj@itemx .ssnolist 586*a9fa9459SzrjControls the inclusion of subsym replacement in the listing output. Ignored. 587*a9fa9459Szrj 588*a9fa9459Szrj@cindex @code{string} directive, TIC54X 589*a9fa9459Szrj@cindex @code{pstring} directive, TIC54X 590*a9fa9459Szrj@item .string "@var{string}" [,...,"@var{string_n}"] 591*a9fa9459Szrj@itemx .pstring "@var{string}" [,...,"@var{string_n}"] 592*a9fa9459SzrjPlace 8-bit characters from @var{string} into the current section. 593*a9fa9459Szrj@code{.string} zero-fills the upper 8 bits of each word, while 594*a9fa9459Szrj@code{.pstring} puts two characters into each word, filling the 595*a9fa9459Szrjmost-significant bits first. Unused space is zero-filled. If a label 596*a9fa9459Szrjis used, it points to the first word initialized. 597*a9fa9459Szrj 598*a9fa9459Szrj@cindex @code{struct} directive, TIC54X 599*a9fa9459Szrj@cindex @code{tag} directive, TIC54X 600*a9fa9459Szrj@cindex @code{endstruct} directive, TIC54X 601*a9fa9459Szrj@item [@var{stag}] .struct [@var{offset}] 602*a9fa9459Szrj@itemx [@var{name_1}] element [@var{count_1}] 603*a9fa9459Szrj@itemx [@var{name_2}] element [@var{count_2}] 604*a9fa9459Szrj@itemx [@var{tname}] .tag @var{stagx} [@var{tcount}] 605*a9fa9459Szrj@itemx ... 606*a9fa9459Szrj@itemx [@var{name_n}] element [@var{count_n}] 607*a9fa9459Szrj@itemx [@var{ssize}] .endstruct 608*a9fa9459Szrj@itemx @var{label} .tag [@var{stag}] 609*a9fa9459SzrjAssign symbolic offsets to the elements of a structure. @var{stag} 610*a9fa9459Szrjdefines a symbol to use to reference the structure. @var{offset} 611*a9fa9459Szrjindicates a starting value to use for the first element encountered; 612*a9fa9459Szrjotherwise it defaults to zero. Each element can have a named offset, 613*a9fa9459Szrj@var{name}, which is a symbol assigned the value of the element's offset 614*a9fa9459Szrjinto the structure. If @var{stag} is missing, these become global 615*a9fa9459Szrjsymbols. @var{count} adjusts the offset that many times, as if 616*a9fa9459Szrj@code{element} were an array. @code{element} may be one of 617*a9fa9459Szrj@code{.byte}, @code{.word}, @code{.long}, @code{.float}, or any 618*a9fa9459Szrjequivalent of those, and the structure offset is adjusted accordingly. 619*a9fa9459Szrj@code{.field} and @code{.string} are also allowed; the size of 620*a9fa9459Szrj@code{.field} is one bit, and @code{.string} is considered to be one 621*a9fa9459Szrjword in size. Only element descriptors, structure/union tags, 622*a9fa9459Szrj@code{.align} and conditional assembly directives are allowed within 623*a9fa9459Szrj@code{.struct}/@code{.endstruct}. @code{.align} aligns member offsets 624*a9fa9459Szrjto word boundaries only. @var{ssize}, if provided, will always be 625*a9fa9459Szrjassigned the size of the structure. 626*a9fa9459Szrj 627*a9fa9459SzrjThe @code{.tag} directive, in addition to being used to define a 628*a9fa9459Szrjstructure/union element within a structure, may be used to apply a 629*a9fa9459Szrjstructure to a symbol. Once applied to @var{label}, the individual 630*a9fa9459Szrjstructure elements may be applied to @var{label} to produce the desired 631*a9fa9459Szrjoffsets using @var{label} as the structure base. 632*a9fa9459Szrj 633*a9fa9459Szrj@cindex @code{tab} directive, TIC54X 634*a9fa9459Szrj@item .tab 635*a9fa9459SzrjSet the tab size in the output listing. Ignored. 636*a9fa9459Szrj 637*a9fa9459Szrj@cindex @code{union} directive, TIC54X 638*a9fa9459Szrj@cindex @code{tag} directive, TIC54X 639*a9fa9459Szrj@cindex @code{endunion} directive, TIC54X 640*a9fa9459Szrj@item [@var{utag}] .union 641*a9fa9459Szrj@itemx [@var{name_1}] element [@var{count_1}] 642*a9fa9459Szrj@itemx [@var{name_2}] element [@var{count_2}] 643*a9fa9459Szrj@itemx [@var{tname}] .tag @var{utagx}[,@var{tcount}] 644*a9fa9459Szrj@itemx ... 645*a9fa9459Szrj@itemx [@var{name_n}] element [@var{count_n}] 646*a9fa9459Szrj@itemx [@var{usize}] .endstruct 647*a9fa9459Szrj@itemx @var{label} .tag [@var{utag}] 648*a9fa9459SzrjSimilar to @code{.struct}, but the offset after each element is reset to 649*a9fa9459Szrjzero, and the @var{usize} is set to the maximum of all defined elements. 650*a9fa9459SzrjStarting offset for the union is always zero. 651*a9fa9459Szrj 652*a9fa9459Szrj@cindex @code{usect} directive, TIC54X 653*a9fa9459Szrj@item [@var{symbol}] .usect "@var{section_name}", @var{size}, [,[@var{blocking_flag}] [,@var{alignment_flag}]] 654*a9fa9459SzrjReserve space for variables in a named, uninitialized section (similar to 655*a9fa9459Szrj.bss). @code{.usect} allows definitions sections independent of .bss. 656*a9fa9459Szrj@var{symbol} points to the first location reserved by this allocation. 657*a9fa9459SzrjThe symbol may be used as a variable name. @var{size} is the allocated 658*a9fa9459Szrjsize in words. @var{blocking_flag} indicates whether to block this 659*a9fa9459Szrjsection on a page boundary (128 words) (@pxref{TIC54X-Block}). 660*a9fa9459Szrj@var{alignment flag} indicates whether the section should be 661*a9fa9459Szrjlongword-aligned. 662*a9fa9459Szrj 663*a9fa9459Szrj@cindex @code{var} directive, TIC54X 664*a9fa9459Szrj@item .var @var{sym}[,..., @var{sym_n}] 665*a9fa9459SzrjDefine a subsym to be a local variable within a macro. See 666*a9fa9459Szrj@xref{TIC54X-Macros}. 667*a9fa9459Szrj 668*a9fa9459Szrj@cindex @code{version} directive, TIC54X 669*a9fa9459Szrj@item .version @var{version} 670*a9fa9459SzrjSet which processor to build instructions for. Though the following 671*a9fa9459Szrjvalues are accepted, the op is ignored. 672*a9fa9459Szrj@table @code 673*a9fa9459Szrj@item 541 674*a9fa9459Szrj@itemx 542 675*a9fa9459Szrj@itemx 543 676*a9fa9459Szrj@itemx 545 677*a9fa9459Szrj@itemx 545LP 678*a9fa9459Szrj@itemx 546LP 679*a9fa9459Szrj@itemx 548 680*a9fa9459Szrj@itemx 549 681*a9fa9459Szrj@end table 682*a9fa9459Szrj@end table 683*a9fa9459Szrj 684*a9fa9459Szrj@node TIC54X-Macros 685*a9fa9459Szrj@section Macros 686*a9fa9459Szrj 687*a9fa9459Szrj@cindex TIC54X-specific macros 688*a9fa9459Szrj@cindex macros, TIC54X 689*a9fa9459SzrjMacros do not require explicit dereferencing of arguments (i.e., \ARG). 690*a9fa9459Szrj 691*a9fa9459SzrjDuring macro expansion, the macro parameters are converted to subsyms. 692*a9fa9459SzrjIf the number of arguments passed the macro invocation exceeds the 693*a9fa9459Szrjnumber of parameters defined, the last parameter is assigned the string 694*a9fa9459Szrjequivalent of all remaining arguments. If fewer arguments are given 695*a9fa9459Szrjthan parameters, the missing parameters are assigned empty strings. To 696*a9fa9459Szrjinclude a comma in an argument, you must enclose the argument in quotes. 697*a9fa9459Szrj 698*a9fa9459Szrj@cindex subsym builtins, TIC54X 699*a9fa9459Szrj@cindex TIC54X subsym builtins 700*a9fa9459Szrj@cindex builtin subsym functions, TIC54X 701*a9fa9459SzrjThe following built-in subsym functions allow examination of the string 702*a9fa9459Szrjvalue of subsyms (or ordinary strings). The arguments are strings 703*a9fa9459Szrjunless otherwise indicated (subsyms passed as args will be replaced by 704*a9fa9459Szrjthe strings they represent). 705*a9fa9459Szrj@table @code 706*a9fa9459Szrj@cindex @code{$symlen} subsym builtin, TIC54X 707*a9fa9459Szrj@item @code{$symlen(@var{str})} 708*a9fa9459SzrjReturns the length of @var{str}. 709*a9fa9459Szrj 710*a9fa9459Szrj@cindex @code{$symcmp} subsym builtin, TIC54X 711*a9fa9459Szrj@item @code{$symcmp(@var{str1},@var{str2})} 712*a9fa9459SzrjReturns 0 if @var{str1} == @var{str2}, non-zero otherwise. 713*a9fa9459Szrj 714*a9fa9459Szrj@cindex @code{$firstch} subsym builtin, TIC54X 715*a9fa9459Szrj@item @code{$firstch(@var{str},@var{ch})} 716*a9fa9459SzrjReturns index of the first occurrence of character constant @var{ch} in 717*a9fa9459Szrj@var{str}. 718*a9fa9459Szrj 719*a9fa9459Szrj@cindex @code{$lastch} subsym builtin, TIC54X 720*a9fa9459Szrj@item @code{$lastch(@var{str},@var{ch})} 721*a9fa9459SzrjReturns index of the last occurrence of character constant @var{ch} in 722*a9fa9459Szrj@var{str}. 723*a9fa9459Szrj 724*a9fa9459Szrj@cindex @code{$isdefed} subsym builtin, TIC54X 725*a9fa9459Szrj@item @code{$isdefed(@var{symbol})} 726*a9fa9459SzrjReturns zero if the symbol @var{symbol} is not in the symbol table, 727*a9fa9459Szrjnon-zero otherwise. 728*a9fa9459Szrj 729*a9fa9459Szrj@cindex @code{$ismember} subsym builtin, TIC54X 730*a9fa9459Szrj@item @code{$ismember(@var{symbol},@var{list})} 731*a9fa9459SzrjAssign the first member of comma-separated string @var{list} to 732*a9fa9459Szrj@var{symbol}; @var{list} is reassigned the remainder of the list. Returns 733*a9fa9459Szrjzero if @var{list} is a null string. Both arguments must be subsyms. 734*a9fa9459Szrj 735*a9fa9459Szrj@cindex @code{$iscons} subsym builtin, TIC54X 736*a9fa9459Szrj@item @code{$iscons(@var{expr})} 737*a9fa9459SzrjReturns 1 if string @var{expr} is binary, 2 if octal, 3 if hexadecimal, 738*a9fa9459Szrj4 if a character, 5 if decimal, and zero if not an integer. 739*a9fa9459Szrj 740*a9fa9459Szrj@cindex @code{$isname} subsym builtin, TIC54X 741*a9fa9459Szrj@item @code{$isname(@var{name})} 742*a9fa9459SzrjReturns 1 if @var{name} is a valid symbol name, zero otherwise. 743*a9fa9459Szrj 744*a9fa9459Szrj@cindex @code{$isreg} subsym builtin, TIC54X 745*a9fa9459Szrj@item @code{$isreg(@var{reg})} 746*a9fa9459SzrjReturns 1 if @var{reg} is a valid predefined register name (AR0-AR7 only). 747*a9fa9459Szrj 748*a9fa9459Szrj@cindex @code{$structsz} subsym builtin, TIC54X 749*a9fa9459Szrj@item @code{$structsz(@var{stag})} 750*a9fa9459SzrjReturns the size of the structure or union represented by @var{stag}. 751*a9fa9459Szrj 752*a9fa9459Szrj@cindex @code{$structacc} subsym builtin, TIC54X 753*a9fa9459Szrj@item @code{$structacc(@var{stag})} 754*a9fa9459SzrjReturns the reference point of the structure or union represented by 755*a9fa9459Szrj@var{stag}. Always returns zero. 756*a9fa9459Szrj 757*a9fa9459Szrj@end table 758*a9fa9459Szrj 759*a9fa9459Szrj@node TIC54X-MMRegs 760*a9fa9459Szrj@section Memory-mapped Registers 761*a9fa9459Szrj 762*a9fa9459Szrj@cindex TIC54X memory-mapped registers 763*a9fa9459Szrj@cindex registers, TIC54X memory-mapped 764*a9fa9459Szrj@cindex memory-mapped registers, TIC54X 765*a9fa9459SzrjThe following symbols are recognized as memory-mapped registers: 766*a9fa9459Szrj 767*a9fa9459Szrj@table @code 768*a9fa9459Szrj@end table 769*a9fa9459Szrj 770*a9fa9459Szrj@node TIC54X-Syntax 771*a9fa9459Szrj@section TIC54X Syntax 772*a9fa9459Szrj@menu 773*a9fa9459Szrj* TIC54X-Chars:: Special Characters 774*a9fa9459Szrj@end menu 775*a9fa9459Szrj 776*a9fa9459Szrj@node TIC54X-Chars 777*a9fa9459Szrj@subsection Special Characters 778*a9fa9459Szrj 779*a9fa9459Szrj@cindex line comment character, TIC54X 780*a9fa9459Szrj@cindex TIC54X line comment character 781*a9fa9459SzrjThe presence of a @samp{;} appearing anywhere on a line indicates the 782*a9fa9459Szrjstart of a comment that extends to the end of that line. 783*a9fa9459Szrj 784*a9fa9459SzrjIf a @samp{#} appears as the first character of a line then the whole 785*a9fa9459Szrjline is treated as a comment, but in this case the line can also be a 786*a9fa9459Szrjlogical line number directive (@pxref{Comments}) or a preprocessor 787*a9fa9459Szrjcontrol command (@pxref{Preprocessing}). 788*a9fa9459Szrj 789*a9fa9459SzrjThe presence of an asterisk (@samp{*}) at the start of a line also 790*a9fa9459Szrjindicates a comment that extends to the end of that line. 791*a9fa9459Szrj 792*a9fa9459Szrj@cindex line separator, TIC54X 793*a9fa9459Szrj@cindex statement separator, TIC54X 794*a9fa9459Szrj@cindex TIC54X line separator 795*a9fa9459SzrjThe TIC54X assembler does not currently support a line separator 796*a9fa9459Szrjcharacter. 797*a9fa9459Szrj 798