dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 68

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Types and Addressing Modes
There is no inherent difference between a byte address and a word address—they are both simply 24-bit
quantities. Individual instructions determine how an address is used: an address in an AGU register is
considered a byte pointer when it is used by instructions that expect byte pointers, and it is considered a
word pointer when it is used by instructions expecting word pointers.
Instructions use the “.BP” suffix to indicate that an address register is to be used as a byte pointer. The
“.B”, “.W”, and “.L” suffixes indicate that an address register represents a word pointer. The suffix “.BP”
is also used to indicate that an absolute address is a byte address.
Characteristics of word pointers include the following:
Characteristics of byte pointers include the following:
Byte pointers are used exclusively for accessing byte values in data memory. Word pointers, however, can
be used for accessing data of any size: byte, word, or long word. The instruction itself determines if an
address is used as a word or byte pointer.
A word pointer can be converted to a byte pointer by left shifting the value 1 bit, using the ASLA
instruction. Similarly, a byte pointer can be converted to a word pointer by logically right shifting the value
1 bit, using the LSRA instruction (the LSB is lost).
Examples of byte and word pointers are shown in the following sections. More detailed examples of byte
and word pointers appear in Section 6.5, “Word Pointer Memory Accesses,” on page 6-8 and Section 6.6,
“Byte Pointer Memory Accesses,” on page 6-13.
3-18
They indicate that an address register (R0–R5, N, SP) points to a word address in memory.
They can be used for byte, word, or long data memory accesses.
Immediate offsets are in bytes (for byte instructions) or in words (for word and long instructions).
Offsets in the N register are expressed in words (for word instructions) or in longs (for long
instructions).
They provide efficient accesses to structures.
They are fully compatible with the DSP56800 architecture, which only supports word accesses.
They indicate that an address register (R0–R5, N) points to a byte address in data memory.
They are used for byte accesses only.
Offsets are always in bytes.
They can only access the lower half of the 24-bit data memory space (the lowest 2
They are extremely efficient for accessing arrays of bytes in memory.
They cannot access program memory.
Several instructions use address registers as byte pointers, including the following:
— MOVE.BP, MOVEU.BP
— ADD.BP, SUB.BP, CMP.BP
— INC.BP, DEC.BP, NEG.BP
— CLR.BP, TST.BP
The SP register cannot be used as a byte pointer. The SP register is always
used as a stack pointer, so it must always be word aligned for the correct
operation of instructions such as JSR, RTS, and RTI. However, it is
possible to place and access bytes on the stack with the (SP – offset)
addressing modes.
DSP56800E Core Reference Manual
NOTE:
Freescale Semiconductor
23
words).

Related parts for dsp56800e