as: TIC54X-Directives

1 
1 9.45.9 Directives
1 -----------------
1 
1 '.align [SIZE]'
1 '.even'
1      Align the section program counter on the next boundary, based on
1      SIZE.  SIZE may be any power of 2.  '.even' is equivalent to
1      '.align' with a SIZE of 2.
1      '1'
1           Align SPC to word boundary
1      '2'
1           Align SPC to longword boundary (same as .even)
1      '128'
1           Align SPC to page boundary
1 
1 '.asg STRING, NAME'
1      Assign NAME the string STRING.  String replacement is performed on
1      STRING before assignment.
1 
1 '.eval STRING, NAME'
1      Evaluate the contents of string STRING and assign the result as a
1      string to the subsym NAME.  String replacement is performed on
1      STRING before assignment.
1 
1 '.bss SYMBOL, SIZE [, [BLOCKING_FLAG] [,ALIGNMENT_FLAG]]'
1      Reserve space for SYMBOL in the .bss section.  SIZE is in words.
1      If present, BLOCKING_FLAG indicates the allocated space should be
1      aligned on a page boundary if it would otherwise cross a page
1      boundary.  If present, ALIGNMENT_FLAG causes the assembler to
1      allocate SIZE on a long word boundary.
1 
1 '.byte VALUE [,...,VALUE_N]'
1 '.ubyte VALUE [,...,VALUE_N]'
1 '.char VALUE [,...,VALUE_N]'
1 '.uchar VALUE [,...,VALUE_N]'
1      Place one or more bytes into consecutive words of the current
1      section.  The upper 8 bits of each word is zero-filled.  If a label
1      is used, it points to the word allocated for the first byte
1      encountered.
1 
1 '.clink ["SECTION_NAME"]'
1      Set STYP_CLINK flag for this section, which indicates to the linker
1      that if no symbols from this section are referenced, the section
1      should not be included in the link.  If SECTION_NAME is omitted,
1      the current section is used.
1 
1 '.c_mode'
1      TBD.
1 
1 '.copy "FILENAME" | FILENAME'
1 '.include "FILENAME" | FILENAME'
1      Read source statements from FILENAME.  The normal include search
1      path is used.  Normally .copy will cause statements from the
1      included file to be printed in the assembly listing and .include
1      will not, but this distinction is not currently implemented.
1 
1 '.data'
1      Begin assembling code into the .data section.
1 
1 '.double VALUE [,...,VALUE_N]'
1 '.ldouble VALUE [,...,VALUE_N]'
1 '.float VALUE [,...,VALUE_N]'
1 '.xfloat VALUE [,...,VALUE_N]'
1      Place an IEEE single-precision floating-point representation of one
1      or more floating-point values into the current section.  All but
1      '.xfloat' align the result on a longword boundary.  Values are
1      stored most-significant word first.
1 
1 '.drlist'
1 '.drnolist'
1      Control printing of directives to the listing file.  Ignored.
1 
1 '.emsg STRING'
1 '.mmsg STRING'
1 '.wmsg STRING'
1      Emit a user-defined error, message, or warning, respectively.
1 
1 '.far_mode'
1      Use extended addressing when assembling statements.  This should
1      appear only once per file, and is equivalent to the -mfar-mode
1      option ⇒'-mfar-mode' TIC54X-Opts.
1 
1 '.fclist'
1 '.fcnolist'
1      Control printing of false conditional blocks to the listing file.
1 
1 '.field VALUE [,SIZE]'
1      Initialize a bitfield of SIZE bits in the current section.  If
1      VALUE is relocatable, then SIZE must be 16.  SIZE defaults to 16
1      bits.  If VALUE does not fit into SIZE bits, the value will be
1      truncated.  Successive '.field' directives will pack starting at
1      the current word, filling the most significant bits first, and
1      aligning to the start of the next word if the field size does not
1      fit into the space remaining in the current word.  A '.align'
1      directive with an operand of 1 will force the next '.field'
1      directive to begin packing into a new word.  If a label is used, it
1      points to the word that contains the specified field.
1 
1 '.global SYMBOL [,...,SYMBOL_N]'
1 '.def SYMBOL [,...,SYMBOL_N]'
1 '.ref SYMBOL [,...,SYMBOL_N]'
1      '.def' nominally identifies a symbol defined in the current file
1      and available to other files.  '.ref' identifies a symbol used in
1      the current file but defined elsewhere.  Both map to the standard
1      '.global' directive.
1 
1 '.half VALUE [,...,VALUE_N]'
1 '.uhalf VALUE [,...,VALUE_N]'
1 '.short VALUE [,...,VALUE_N]'
1 '.ushort VALUE [,...,VALUE_N]'
1 '.int VALUE [,...,VALUE_N]'
1 '.uint VALUE [,...,VALUE_N]'
1 '.word VALUE [,...,VALUE_N]'
1 '.uword VALUE [,...,VALUE_N]'
1      Place one or more values into consecutive words of the current
1      section.  If a label is used, it points to the word allocated for
1      the first value encountered.
1 
1 '.label SYMBOL'
1      Define a special SYMBOL to refer to the load time address of the
1      current section program counter.
1 
1 '.length'
1 '.width'
1      Set the page length and width of the output listing file.  Ignored.
1 
1 '.list'
1 '.nolist'
1      Control whether the source listing is printed.  Ignored.
1 
1 '.long VALUE [,...,VALUE_N]'
1 '.ulong VALUE [,...,VALUE_N]'
1 '.xlong VALUE [,...,VALUE_N]'
1      Place one or more 32-bit values into consecutive words in the
1      current section.  The most significant word is stored first.
1      '.long' and '.ulong' align the result on a longword boundary;
1      'xlong' does not.
1 
1 '.loop [COUNT]'
1 '.break [CONDITION]'
1 '.endloop'
1      Repeatedly assemble a block of code.  '.loop' begins the block, and
1      '.endloop' marks its termination.  COUNT defaults to 1024, and
1      indicates the number of times the block should be repeated.
1      '.break' terminates the loop so that assembly begins after the
1      '.endloop' directive.  The optional CONDITION will cause the loop
1      to terminate only if it evaluates to zero.
1 
1 'MACRO_NAME .macro [PARAM1][,...PARAM_N]'
1 '[.mexit]'
1 '.endm'
11      See the section on macros for more explanation (⇒
      TIC54X-Macros.
1 
1 '.mlib "FILENAME" | FILENAME'
1      Load the macro library FILENAME.  FILENAME must be an archived
1      library (BFD ar-compatible) of text files, expected to contain only
1      macro definitions.  The standard include search path is used.
1 
1 '.mlist'
1 '.mnolist'
1      Control whether to include macro and loop block expansions in the
1      listing output.  Ignored.
1 
1 '.mmregs'
1      Define global symbolic names for the 'c54x registers.  Supposedly
1      equivalent to executing '.set' directives for each register with
1      its memory-mapped value, but in reality is provided only for
1      compatibility and does nothing.
1 
1 '.newblock'
1      This directive resets any TIC54X local labels currently defined.
1      Normal 'as' local labels are unaffected.
1 
1 '.option OPTION_LIST'
1      Set listing options.  Ignored.
1 
1 '.sblock "SECTION_NAME" | SECTION_NAME [,"NAME_N" | NAME_N]'
1      Designate SECTION_NAME for blocking.  Blocking guarantees that a
1      section will start on a page boundary (128 words) if it would
1      otherwise cross a page boundary.  Only initialized sections may be
1      designated with this directive.  See also ⇒TIC54X-Block.
1 
1 '.sect "SECTION_NAME"'
1      Define a named initialized section and make it the current section.
1 
1 'SYMBOL .set "VALUE"'
1 'SYMBOL .equ "VALUE"'
1      Equate a constant VALUE to a SYMBOL, which is placed in the symbol
1      table.  SYMBOL may not be previously defined.
1 
1 '.space SIZE_IN_BITS'
1 '.bes SIZE_IN_BITS'
1      Reserve the given number of bits in the current section and
1      zero-fill them.  If a label is used with '.space', it points to the
1      *first* word reserved.  With '.bes', the label points to the *last*
1      word reserved.
1 
1 '.sslist'
1 '.ssnolist'
1      Controls the inclusion of subsym replacement in the listing output.
1      Ignored.
1 
1 '.string "STRING" [,...,"STRING_N"]'
1 '.pstring "STRING" [,...,"STRING_N"]'
1      Place 8-bit characters from STRING into the current section.
1      '.string' zero-fills the upper 8 bits of each word, while
1      '.pstring' puts two characters into each word, filling the
1      most-significant bits first.  Unused space is zero-filled.  If a
1      label is used, it points to the first word initialized.
1 
1 '[STAG] .struct [OFFSET]'
1 '[NAME_1] element [COUNT_1]'
1 '[NAME_2] element [COUNT_2]'
1 '[TNAME] .tag STAGX [TCOUNT]'
1 '...'
1 '[NAME_N] element [COUNT_N]'
1 '[SSIZE] .endstruct'
1 'LABEL .tag [STAG]'
1      Assign symbolic offsets to the elements of a structure.  STAG
1      defines a symbol to use to reference the structure.  OFFSET
1      indicates a starting value to use for the first element
1      encountered; otherwise it defaults to zero.  Each element can have
1      a named offset, NAME, which is a symbol assigned the value of the
1      element's offset into the structure.  If STAG is missing, these
1      become global symbols.  COUNT adjusts the offset that many times,
1      as if 'element' were an array.  'element' may be one of '.byte',
1      '.word', '.long', '.float', or any equivalent of those, and the
1      structure offset is adjusted accordingly.  '.field' and '.string'
1      are also allowed; the size of '.field' is one bit, and '.string' is
1      considered to be one word in size.  Only element descriptors,
1      structure/union tags, '.align' and conditional assembly directives
1      are allowed within '.struct'/'.endstruct'.  '.align' aligns member
1      offsets to word boundaries only.  SSIZE, if provided, will always
1      be assigned the size of the structure.
1 
1      The '.tag' directive, in addition to being used to define a
1      structure/union element within a structure, may be used to apply a
1      structure to a symbol.  Once applied to LABEL, the individual
1      structure elements may be applied to LABEL to produce the desired
1      offsets using LABEL as the structure base.
1 
1 '.tab'
1      Set the tab size in the output listing.  Ignored.
1 
1 '[UTAG] .union'
1 '[NAME_1] element [COUNT_1]'
1 '[NAME_2] element [COUNT_2]'
1 '[TNAME] .tag UTAGX[,TCOUNT]'
1 '...'
1 '[NAME_N] element [COUNT_N]'
1 '[USIZE] .endstruct'
1 'LABEL .tag [UTAG]'
1      Similar to '.struct', but the offset after each element is reset to
1      zero, and the USIZE is set to the maximum of all defined elements.
1      Starting offset for the union is always zero.
1 
1 '[SYMBOL] .usect "SECTION_NAME", SIZE, [,[BLOCKING_FLAG] [,ALIGNMENT_FLAG]]'
1      Reserve space for variables in a named, uninitialized section
1      (similar to .bss).  '.usect' allows definitions sections
1      independent of .bss.  SYMBOL points to the first location reserved
1      by this allocation.  The symbol may be used as a variable name.
1      SIZE is the allocated size in words.  BLOCKING_FLAG indicates
11      whether to block this section on a page boundary (128 words) (⇒
      TIC54X-Block).  ALIGNMENT FLAG indicates whether the section
1      should be longword-aligned.
1 
1 '.var SYM[,..., SYM_N]'
11      Define a subsym to be a local variable within a macro.  See ⇒
      TIC54X-Macros.
1 
1 '.version VERSION'
1      Set which processor to build instructions for.  Though the
1      following values are accepted, the op is ignored.
1      '541'
1      '542'
1      '543'
1      '545'
1      '545LP'
1      '546LP'
1      '548'
1      '549'
1