Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TMS320C2x DSP - in immediate addressing, the instruction word(s) contains the value of the http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
In immediate addressing, the instruction word(s) contains the value of the
immediate operand. The TMS320C2x has both single-word (8-bit and 13-bit
constant) short immediate instructions and two-word (16-bit constant) long
immediate instructions. The immediate operand is contained within the
instruction word itself in short immediate instructions. In long immediate
instructions, the word following the instruction opcode is used as the
immediate operand.

The following short immediate instructions contain the immediate operand
in the instruction word and execute within a single instruction cycle. The
length of the constant operand is instruction-dependent. Note that the
ADDK, ADRK, SBRK, and SUBK instructions are available on the TMS320C25.

      ADDK  Add to the accumulator short immediate (8-bit absolute
            constant)
      ADRK  Add to auxiliary register short immediate (8-bit
            absolute constant)
      LACK  Load accumulator short immediate (8-bit absolute
            constant)
      LARK  Load auxiliary register short immediate (8-bit absolute
            constant)
      LARP  Load auxiliary register pointer (3-bit constant)
      LDPK  Load data memory page pointer immediate (9-bit constant)
      MPYK  Multiply immediate (13-bit two's complement constant)
      RPTK  Repeat instruction as specified by immediate value (8-
            bit constant)
      SBRK  Subtract from auxiliary register short immediate (8-bit
            absolute constant)
      SUBK  Subtract from accumulator short immediate (8-bit
            absolute constant)

Example of short immediate addressing format:

      RPTK  99          Execute the instruction following this instruction
                        100 times.
With the RPTK instruction, the immediate operand is contained as part of
the instruction opcode. The instruction format for RPTK is:

         15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
         +-----------------------------------------------+
         |1  1  0  0  1  0  1  1|      8-bit constant    |
         +-----------------------------------------------+

For long immediate instructions, the constant is a 16-bit value in the
word following the opcode. The 16-bit value can be optionally used  as an
absolute constant or as a two's complement value.

      ADLK  Add to the accumulator long immediate with shift
            (absolute or two's complement)
      ANDK  AND immediate with accumulator with shift
      LALK  Load accumulator long immediate with shift (absolute or
            two's complement)
      LRLK  Load auxiliary register long immediate
      ORK   OR immediate with accumulator with shift
      SBLK  Subtract from accumulator long immediate with shift
            (absolute or two's complement)
      XORK  Exclusive-OR immediate with accumulator with shift.

Example of the long addressing format:

      ADLK  16384,2     Add to the accumulator the value 16384 with a
                        shift to the left of two, effectively adding 65536
                        to the contents of the accumulator.

The ADLK instruction uses the word following the instruction opcode as the
immediate operand. The instruction format for ADLK is:

         15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
         +-----------------------------------------------+
         |1  1  0  1|   shift   | 0  0  0  0  0  0  1  0 |
         |-----------------------------------------------|
         |                16-bit constant                |
         +-----------------------------------------------+

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson