<< Chapter < Page | Chapter >> Page > |
Microprocessors provide a number of ways to specify the location
of data to be used in calculations. For example, one of thedata values to be used in an
add
instruction may be
encoded as part of that instruction's
opcode , the
raw machine language produced by the assembler as it parses yourassembly language program. This is known as
immediate
addressing . Alternatively, perhaps the opcode will
instead contain a memory address which holds the data(
direct addressing ). More commonly, the instruction
will specify that an auxiliary register holds the memory addresswhich in turn holds the data (
indirect addressing ).
The processor knows which addressing mode is being used byexamining special bit fields in the instruction opcode.
Knowing the basic addressing modes of your microprocessor is important because they map directly into assembly languagesyntax. Many annoying and sometimes hard-to-find bugs are caused by inadvertently using the wrong addressing mode in aninstruction. Also, in any assembly language, the need to use a particular addressing mode often dictates which instruction onepicks for a given task.
Chapter six, Addressing modes , in the CPU Reference Guide contains extended descriptions of the addressing modes described below.
Whenever the abbreviations
ACw
,
ACx
,
ACy
,
ACz
,
xsrc
or
xdst
are used in the assembly language syntax
description for an instruction, it means that only theaccumulators
AC0
,
AC1
,
AC2
and
AC3
may be used for
that particular operand. At times,
src
and
dst
may also be referring to the accumulators.
Examples:
MOV *AR3, *AR4, AC0 ; AC0(15-0) = contents of memory location pointed to by AR3
; AC0(39-16) = contents of memory location pointed to by AR4
; sign extended to 24 bits
MOV AC0, AC1 ; AC1 = AC0
MOV AC0, *AR3 ; sets content of memory location pointed to by AR3 = AC0(15-0)
MOV HI(AC0), *AR7+ ; sets (contents of memory location to by AR7) = ACO(31-16),
; and then increments AR7 by one
Many of the TMS320C55x registers are memory-mapped, meaning
that they occupy real addresses at the low end of data memoryspace. The most commonly used of these are the accumulators
AC0
through
AC3
, auxiliary
registers
AR0
through
AR7
. The temporary registers T0 - T3, BK, and various BSA (buffer start address) are also memory mapped. Memory mapped registers are stored from 00 0000h to 00 005Fh.
Notification Switch
Would you like to follow the 'Digital signal processing laboratory (ece 420 55x)' conversation and receive update notifications?